1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

updated for bug#28770

This commit is contained in:
unknown
2007-06-22 17:05:14 +02:00
parent 12807651f1
commit 98a0b45213
4 changed files with 62 additions and 1 deletions

View File

@@ -1261,6 +1261,39 @@ runBug29167(NDBT_Context* ctx, NDBT_Step* step)
return result;
}
int
runBug28770(NDBT_Context* ctx, NDBT_Step* step) {
Ndb* pNdb = GETNDB(step);
NdbRestarter restarter;
int result = NDBT_OK;
int count = 0;
Uint32 i = 0;
Uint32 loops = ctx->getNumLoops();
int records = ctx->getNumRecords();
UtilTransactions utilTrans(*ctx->getTab());
HugoTransactions hugoTrans(*ctx->getTab());
g_info << "Loading records..." << endl; hugoTrans.loadTable(pNdb,
records);
while(i<=loops && result != NDBT_FAILED){
g_info << "Loop " << i << "/"<< loops <<" started" << endl;
CHECK(restarter.restartAll(false, true, false) == 0);
NdbSleep_SecSleep(3);
CHECK(restarter.waitClusterNoStart() == 0);
restarter.insertErrorInAllNodes(6007);
CHECK(restarter.startAll()== 0);
CHECK(restarter.waitClusterStarted() == 0);
CHECK(utilTrans.selectCount(pNdb, 64, &count) == 0);
CHECK(count == records);
i++;
}
ndbout << " runBug28770 finished" << endl;
return result;
}
NDBT_TESTSUITE(testSystemRestart);
TESTCASE("SR1",
"Basic system restart test. Focus on testing restart from REDO log.\n"
@@ -1446,6 +1479,20 @@ TESTCASE("Bug29167", "")
INITIALIZER(runWaitStarted);
STEP(runBug29167);
}
TESTCASE("Bug28770",
"Check readTableFile1 fails, readTableFile2 succeeds\n"
"1. Restart all node -nostart\n"
"2. Insert error 6100 into all nodes\n"
"3. Start all nodes\n"
"4. Ensure cluster start\n"
"5. Read and verify reocrds\n"
"6. Repeat until looping is completed\n"){
INITIALIZER(runWaitStarted);
INITIALIZER(runClearTable);
STEP(runBug28770);
FINALIZER(runClearTable);
}
NDBT_TESTSUITE_END(testSystemRestart);