From: Date: March 19 2007 12:34pm Subject: bk commit into 5.1 tree (jonas:1.2122) BUG#20185 List-Archive: http://lists.mysql.com/commits/22250 X-Bug: 20185 Message-Id: <20070319113447.41B9982853@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@stripped, 2007-03-19 12:34:43+01:00, jonas@stripped +1 -0 ndb - bug#20185 (wl2325-5.0) fix race in testprg, causing random TC crash storage/ndb/test/ndbapi/testNodeRestart.cpp@stripped, 2007-03-19 12:34:42+01:00, jonas@stripped +22 -5 fix race in testprg, causing random TC crash # 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/drop5 --- 1.33/storage/ndb/test/ndbapi/testNodeRestart.cpp 2007-03-19 12:34:47 +01:00 +++ 1.34/storage/ndb/test/ndbapi/testNodeRestart.cpp 2007-03-19 12:34:47 +01:00 @@ -972,12 +972,18 @@ 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); - + Vector nodes; + for (Uint32 i = 0; igetConnectedNodeId(); + if (node != masterNode) + { + hugoOps.closeTransaction(pNdb); + goto retry; + } + + int nodeId; do { nodeId = restarter.getDbNodeId(rand() % restarter.getNumDbNodes()); } while (nodeId == node); - if (restarter.insertErrorInAllNodes(7030)) - return NDBT_FAILED; - + ndbout_c("7031 to %d", nodeId); if (restarter.insertErrorInNode(nodeId, 7031)) return NDBT_FAILED; + + for (Uint32 i = 0; i