From: Date: June 2 2006 3:54pm Subject: bk commit into 5.1 tree (jonas:1.2385) BUG#20185 List-Archive: http://lists.mysql.com/commits/7210 X-Bug: 20185 Message-Id: <20060602135415.7CE3841304C@perch.ndb.mysql.com> Below is the list of changes that have just been committed into a local 5.1 repository of jonas. When jonas does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.2385 06/06/02 15:54:09 jonas@stripped +2 -0 ndb - bug#20185 update test prg + fix typo storage/ndb/test/ndbapi/testNodeRestart.cpp 1.28 06/06/02 15:54:06 jonas@stripped +11 -2 upgrade test prg not to kill master node as master take over wont work with all these dealyed GCP_PREPARE storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 1.117 06/06/02 15:54:06 jonas@stripped +1 -1 compile error # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: jonas # Host: perch.ndb.mysql.com # Root: /home/jonas/src/51-jonas --- 1.116/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2006-06-02 15:22:46 +02:00 +++ 1.117/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2006-06-02 15:54:06 +02:00 @@ -7093,7 +7093,7 @@ Dbtc::nodeFailCheckTransactions(Signal* for (transPtr.i = transPtrI; transPtr.i < capiConnectFilesize; transPtr.i++) { ptrCheckGuard(transPtr, capiConnectFilesize, apiConnectRecord); - Uiint32 state = transPtr.p->apiConnectstate; + Uint32 state = transPtr.p->apiConnectstate; if (transPtr.p->m_transaction_nodes.get(failedNodeId)) { jam(); --- 1.27/storage/ndb/test/ndbapi/testNodeRestart.cpp 2006-06-01 09:07:56 +02:00 +++ 1.28/storage/ndb/test/ndbapi/testNodeRestart.cpp 2006-06-02 15:54:06 +02:00 @@ -879,12 +879,15 @@ int runBug20185(NDBT_Context* ctx, NDBT_ HugoOperations hugoOps(*ctx->getTab()); Ndb* pNdb = GETNDB(step); + const int masterNode = restarter.getMasterNodeId(); + int dump[] = { 7090, 20 } ; if (restarter.dumpStateAllNodes(dump, 2)) return NDBT_FAILED; NdbSleep_MilliSleep(3000); - + +retry: if(hugoOps.startTransaction(pNdb) != 0) return NDBT_FAILED; @@ -894,8 +897,14 @@ int runBug20185(NDBT_Context* ctx, NDBT_ if (hugoOps.execute_NoCommit(pNdb) != 0) return NDBT_FAILED; - int nodeId; const int node = hugoOps.getTransaction()->getConnectedNodeId(); + if (node != masterNode) + { + hugoOps.closeTransaction(pNdb); + goto retry; + } + + int nodeId; do { nodeId = restarter.getDbNodeId(rand() % restarter.getNumDbNodes()); } while (nodeId == node);