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

ndb - bug#26450

partial backport from 6.2 + add fix of bug
This commit is contained in:
jonas@perch.ndb.mysql.com
2007-10-23 11:24:34 +02:00
parent 9cd83c5365
commit ac1dc64ebb
18 changed files with 452 additions and 22 deletions

View File

@ -1501,6 +1501,54 @@ int runSR_DD_2(NDBT_Context* ctx, NDBT_Step* step)
return result;
}
int
runBug27434(NDBT_Context* ctx, NDBT_Step* step)
{
int result = NDBT_OK;
NdbRestarter restarter;
Ndb* pNdb = GETNDB(step);
const Uint32 nodeCount = restarter.getNumDbNodes();
if (nodeCount < 2)
return NDBT_OK;
int args[] = { DumpStateOrd::DihMaxTimeBetweenLCP };
int dump[] = { DumpStateOrd::DihStartLcpImmediately };
int filter[] = { 15, NDB_MGM_EVENT_CATEGORY_CHECKPOINT, 0 };
NdbLogEventHandle handle =
ndb_mgm_create_logevent_handle(restarter.handle, filter);
struct ndb_logevent event;
do {
int node1 = restarter.getDbNodeId(rand() % nodeCount);
CHECK(restarter.restartOneDbNode(node1, false, true, true) == 0);
NdbSleep_SecSleep(3);
CHECK(restarter.waitNodesNoStart(&node1, 1) == 0);
CHECK(restarter.dumpStateAllNodes(args, 1) == 0);
for (Uint32 i = 0; i<3; i++)
{
CHECK(restarter.dumpStateAllNodes(dump, 1) == 0);
while(ndb_logevent_get_next(handle, &event, 0) >= 0 &&
event.type != NDB_LE_LocalCheckpointStarted);
while(ndb_logevent_get_next(handle, &event, 0) >= 0 &&
event.type != NDB_LE_LocalCheckpointCompleted);
}
restarter.restartAll(false, true, true);
NdbSleep_SecSleep(3);
CHECK(restarter.waitClusterNoStart() == 0);
restarter.insertErrorInNode(node1, 5046);
restarter.startAll();
CHECK(restarter.waitClusterStarted() == 0);
} while(false);
return result;
}
NDBT_TESTSUITE(testSystemRestart);
TESTCASE("SR1",
"Basic system restart test. Focus on testing restart from REDO log.\n"
@ -1681,6 +1729,12 @@ TESTCASE("Bug24664",
STEP(runBug24664);
FINALIZER(runClearTable);
}
TESTCASE("Bug27434",
"")
{
INITIALIZER(runWaitStarted);
STEP(runBug27434);
}
TESTCASE("SR_DD_1", "")
{
TC_PROPERTY("ALL", 1);