mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge perch.ndb.mysql.com:/home/jonas/src/51-work
into perch.ndb.mysql.com:/home/jonas/src/51-jonas
This commit is contained in:
@ -871,6 +871,56 @@ runBug18612SR(NDBT_Context* ctx, NDBT_Step* step){
|
||||
return NDBT_OK;
|
||||
}
|
||||
|
||||
int runBug20185(NDBT_Context* ctx, NDBT_Step* step){
|
||||
int result = NDBT_OK;
|
||||
int loops = ctx->getNumLoops();
|
||||
int records = ctx->getNumRecords();
|
||||
NdbRestarter restarter;
|
||||
HugoOperations hugoOps(*ctx->getTab());
|
||||
Ndb* pNdb = GETNDB(step);
|
||||
|
||||
int dump[] = { 7090, 20 } ;
|
||||
if (restarter.dumpStateAllNodes(dump, 2))
|
||||
return NDBT_FAILED;
|
||||
|
||||
NdbSleep_MilliSleep(3000);
|
||||
|
||||
if(hugoOps.startTransaction(pNdb) != 0)
|
||||
return NDBT_FAILED;
|
||||
|
||||
if(hugoOps.pkUpdateRecord(pNdb, 1, 1) != 0)
|
||||
return NDBT_FAILED;
|
||||
|
||||
if (hugoOps.execute_NoCommit(pNdb) != 0)
|
||||
return NDBT_FAILED;
|
||||
|
||||
int nodeId;
|
||||
const int node = hugoOps.getTransaction()->getConnectedNodeId();
|
||||
do {
|
||||
nodeId = restarter.getDbNodeId(rand() % restarter.getNumDbNodes());
|
||||
} while (nodeId == node);
|
||||
|
||||
if (restarter.insertErrorInAllNodes(7030))
|
||||
return NDBT_FAILED;
|
||||
|
||||
if (restarter.insertErrorInNode(nodeId, 7031))
|
||||
return NDBT_FAILED;
|
||||
|
||||
NdbSleep_MilliSleep(500);
|
||||
|
||||
if (hugoOps.execute_Commit(pNdb) == 0)
|
||||
return NDBT_FAILED;
|
||||
|
||||
NdbSleep_MilliSleep(3000);
|
||||
|
||||
restarter.waitClusterStarted();
|
||||
|
||||
if (restarter.dumpStateAllNodes(dump, 1))
|
||||
return NDBT_FAILED;
|
||||
|
||||
return NDBT_OK;
|
||||
}
|
||||
|
||||
|
||||
NDBT_TESTSUITE(testNodeRestart);
|
||||
TESTCASE("NoLoad",
|
||||
@ -1178,6 +1228,12 @@ TESTCASE("Bug18612SR",
|
||||
STEP(runBug18612SR);
|
||||
FINALIZER(runClearTable);
|
||||
}
|
||||
TESTCASE("Bug20185",
|
||||
""){
|
||||
INITIALIZER(runLoadTable);
|
||||
STEP(runBug20185);
|
||||
FINALIZER(runClearTable);
|
||||
}
|
||||
NDBT_TESTSUITE_END(testNodeRestart);
|
||||
|
||||
int main(int argc, const char** argv){
|
||||
|
Reference in New Issue
Block a user