Commit 040fcb2d authored by joreland@mysql.com's avatar joreland@mysql.com

Fixed initialization of trans id

parent eff2fa5e
...@@ -87,7 +87,7 @@ Ndb::init(int aMaxNoOfTransactions) ...@@ -87,7 +87,7 @@ Ndb::init(int aMaxNoOfTransactions)
}//if }//if
theNdbBlockNumber = tBlockNo; theNdbBlockNumber = tBlockNo;
theFacade->unlock_mutex(); theFacade->unlock_mutex();
theDictionary->setTransporter(this, theFacade); theDictionary->setTransporter(this, theFacade);
...@@ -185,10 +185,12 @@ Ndb::executeMessage(void* NdbObject, ...@@ -185,10 +185,12 @@ Ndb::executeMessage(void* NdbObject,
void Ndb::connected(Uint32 ref) void Ndb::connected(Uint32 ref)
{ {
theMyRef= ref; theMyRef= ref;
theNode= refToNode(theMyRef); theNode= refToNode(ref);
if (theNdbBlockNumber >= 0) Uint64 tBlockNo= refToBlock(ref);
if (theNdbBlockNumber >= 0){
assert(theMyRef == numberToRef(theNdbBlockNumber, theNode)); assert(theMyRef == numberToRef(theNdbBlockNumber, theNode));
}
TransporterFacade * theFacade = TransporterFacade::instance(); TransporterFacade * theFacade = TransporterFacade::instance();
int i; int i;
theNoOfDBnodes= 0; theNoOfDBnodes= 0;
...@@ -198,11 +200,11 @@ void Ndb::connected(Uint32 ref) ...@@ -198,11 +200,11 @@ void Ndb::connected(Uint32 ref)
theNoOfDBnodes++; theNoOfDBnodes++;
} }
} }
theFirstTransId = ((Uint64)theNdbBlockNumber << 52)+ theFirstTransId = ((Uint64)tBlockNo << 52)+
((Uint64)theNode << 40); ((Uint64)theNode << 40);
theFirstTransId += theFacade->m_max_trans_id; theFirstTransId += theFacade->m_max_trans_id;
// assert(0); // assert(0);
DBUG_PRINT("info",("connected with ref=%x, id=%d, no_db_nodes=%d, first_trans_id=%d", DBUG_PRINT("info",("connected with ref=%x, id=%d, no_db_nodes=%d, first_trans_id=%lx",
theMyRef, theMyRef,
theNode, theNode,
theNoOfDBnodes, theNoOfDBnodes,
......
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