1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

ndb - bug#20185

Fix race in testprg...causing random TC crashes
This commit is contained in:
jonas@perch.ndb.mysql.com
2007-03-19 12:31:23 +01:00
parent bdb70f7b43
commit 09e403aa9e
2 changed files with 16 additions and 13 deletions

View File

@ -887,6 +887,9 @@ int runBug20185(NDBT_Context* ctx, NDBT_Step* step){
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)
@ -910,11 +913,16 @@ retry:
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);