correct initialization of event operation to enable early delete

parent d2b04770
...@@ -79,7 +79,8 @@ NdbEventOperationImpl::NdbEventOperationImpl(NdbEventOperation &f, ...@@ -79,7 +79,8 @@ NdbEventOperationImpl::NdbEventOperationImpl(NdbEventOperation &f,
NdbEventOperation(*this), NdbEventOperation(*this),
m_facade(&f), m_facade(&f),
m_ndb(theNdb), m_ndb(theNdb),
m_state(EO_ERROR) m_state(EO_ERROR),
m_oid(~(Uint32)0)
{ {
DBUG_ENTER("NdbEventOperationImpl::NdbEventOperationImpl"); DBUG_ENTER("NdbEventOperationImpl::NdbEventOperationImpl");
...@@ -88,7 +89,11 @@ NdbEventOperationImpl::NdbEventOperationImpl(NdbEventOperation &f, ...@@ -88,7 +89,11 @@ NdbEventOperationImpl::NdbEventOperationImpl(NdbEventOperation &f,
assert(myDict != NULL); assert(myDict != NULL);
const NdbDictionary::Event *myEvnt = myDict->getEvent(eventName); const NdbDictionary::Event *myEvnt = myDict->getEvent(eventName);
if (!myEvnt) { m_error.code= myDict->getNdbError().code; DBUG_VOID_RETURN; } if (!myEvnt)
{
m_error.code= myDict->getNdbError().code;
DBUG_VOID_RETURN;
}
init(myEvnt->m_impl); init(myEvnt->m_impl);
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
...@@ -99,7 +104,8 @@ NdbEventOperationImpl::NdbEventOperationImpl(Ndb *theNdb, ...@@ -99,7 +104,8 @@ NdbEventOperationImpl::NdbEventOperationImpl(Ndb *theNdb,
NdbEventOperation(*this), NdbEventOperation(*this),
m_facade(this), m_facade(this),
m_ndb(theNdb), m_ndb(theNdb),
m_state(EO_ERROR) m_state(EO_ERROR),
m_oid(~(Uint32)0)
{ {
DBUG_ENTER("NdbEventOperationImpl::NdbEventOperationImpl [evnt]"); DBUG_ENTER("NdbEventOperationImpl::NdbEventOperationImpl [evnt]");
init(evnt); init(evnt);
...@@ -113,7 +119,6 @@ NdbEventOperationImpl::init(NdbEventImpl& evnt) ...@@ -113,7 +119,6 @@ NdbEventOperationImpl::init(NdbEventImpl& evnt)
m_magic_number = 0; m_magic_number = 0;
mi_type = 0; mi_type = 0;
m_oid = ~(Uint32)0;
m_change_mask = 0; m_change_mask = 0;
#ifdef VM_TRACE #ifdef VM_TRACE
m_data_done_count = 0; m_data_done_count = 0;
...@@ -173,6 +178,9 @@ NdbEventOperationImpl::~NdbEventOperationImpl() ...@@ -173,6 +178,9 @@ NdbEventOperationImpl::~NdbEventOperationImpl()
DBUG_ENTER("NdbEventOperationImpl::~NdbEventOperationImpl"); DBUG_ENTER("NdbEventOperationImpl::~NdbEventOperationImpl");
m_magic_number= 0; m_magic_number= 0;
if (m_oid == ~(Uint32)0)
DBUG_VOID_RETURN;
stop(); stop();
// m_bufferHandle->dropSubscribeEvent(m_bufferId); // m_bufferHandle->dropSubscribeEvent(m_bufferId);
; // ToDo? We should send stop signal here ; // ToDo? We should send stop signal here
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment