Commit 596d010a authored by joreland@mysql.com's avatar joreland@mysql.com

fix for testTransactions -n InsertInsert

- Add sequence to the initial trans id so that create/drop ndb object
  don't generate same transid
parent 8db262f0
......@@ -203,7 +203,7 @@ NdbConnection::restart(){
releaseCompletedOperations();
Uint64 tTransid = theNdb->theFirstTransId;
theTransactionId = tTransid;
if((Uint32)tTransid == ((Uint32)~0)){
if ((tTransid & 0xFFFFFFFF) == 0xFFFFFFFF) {
theNdb->theFirstTransId = (tTransid >> 32) << 32;
} else {
theNdb->theFirstTransId = tTransid + 1;
......
......@@ -97,6 +97,7 @@ Ndb::init(int aMaxNoOfTransactions)
}
theFirstTransId = ((Uint64)theNdbBlockNumber << 52)+((Uint64)theNode << 40);
theFirstTransId += theFacade->m_open_count;
theFacade->unlock_mutex();
......
......@@ -529,6 +529,7 @@ TransporterFacade::TransporterFacade() :
theClusterMgr = NULL;
theArbitMgr = NULL;
theStartNodeId = 1;
m_open_count = 0;
}
bool
......@@ -683,6 +684,7 @@ TransporterFacade::open(void* objRef,
ExecuteFunction fun,
NodeStatusFunction statusFun)
{
m_open_count++;
return m_threads.open(objRef, fun, statusFun);
}
......
......@@ -209,6 +209,8 @@ private:
}
} m_threads;
Uint32 m_open_count;
/**
* execute function
*/
......
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