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<int> nodes;
+ for (Uint32 i = 0; i<restarter.getNumDbNodes(); i++)
+ nodes.push_back(restarter.getDbNodeId(i));
+
+retry:
if(hugoOps.startTransaction(pNdb) != 0)
return NDBT_FAILED;
@@ -987,17 +993,28 @@
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);
- 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<nodes.size(); i++)
+ {
+ if (nodes[i] != nodeId)
+ if (restarter.insertErrorInNode(nodes[i], 7030))
+ return NDBT_FAILED;
+ }
NdbSleep_MilliSleep(500);
| Thread |
|---|
| • bk commit into 5.1 tree (jonas:1.2122) BUG#20185 | jonas | 19 Mar |