Skip to content

Commit a3c733c

Browse files
author
jonas@perch.ndb.mysql.com
committed
Merge perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
2 parents a235361 + 627a56b commit a3c733c

File tree

3 files changed

+63
-5
lines changed

3 files changed

+63
-5
lines changed

storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -10235,6 +10235,7 @@ void Dbtc::inithost(Signal* signal)
1023510235
hostptr.p->noOfWordsTCINDXCONF = 0;
1023610236
hostptr.p->noOfPackedWordsLqh = 0;
1023710237
hostptr.p->hostLqhBlockRef = calcLqhBlockRef(hostptr.i);
10238+
hostptr.p->m_nf_bits = 0;
1023810239
}//for
1023910240
c_alive_nodes.clear();
1024010241
}//Dbtc::inithost()

storage/ndb/test/ndbapi/testNodeRestart.cpp

+58-5
Original file line numberDiff line numberDiff line change
@@ -963,12 +963,62 @@ int runBug24717(NDBT_Context* ctx, NDBT_Step* step){
963963

964964
restarter.startNodes(&nodeId, 1);
965965

966-
for (Uint32 i = 0; i < 100; i++)
967-
{
968-
hugoTrans.pkReadRecords(pNdb, 100, 1, NdbOperation::LM_CommittedRead);
969-
}
970-
966+
do {
967+
for (Uint32 i = 0; i < 100; i++)
968+
{
969+
hugoTrans.pkReadRecords(pNdb, 100, 1, NdbOperation::LM_CommittedRead);
970+
}
971+
} while (restarter.waitClusterStarted(5) != 0);
972+
}
973+
974+
return NDBT_OK;
975+
}
976+
977+
int
978+
runBug29364(NDBT_Context* ctx, NDBT_Step* step){
979+
int result = NDBT_OK;
980+
int loops = ctx->getNumLoops();
981+
int records = ctx->getNumRecords();
982+
NdbRestarter restarter;
983+
Ndb* pNdb = GETNDB(step);
984+
985+
HugoTransactions hugoTrans(*ctx->getTab());
986+
987+
if (restarter.getNumDbNodes() < 4)
988+
return NDBT_OK;
989+
990+
int dump0[] = { 9000, 0 } ;
991+
int dump1[] = { 9001, 0 } ;
992+
Uint32 ownNode = refToNode(pNdb->getReference());
993+
dump0[1] = ownNode;
994+
995+
for (; loops; loops --)
996+
{
997+
int node0 = restarter.getDbNodeId(rand() % restarter.getNumDbNodes());
998+
int node1 = restarter.getRandomNodeOtherNodeGroup(node0, rand());
999+
1000+
restarter.restartOneDbNode(node0, false, true, true);
1001+
restarter.waitNodesNoStart(&node0, 1);
1002+
restarter.startNodes(&node0, 1);
9711003
restarter.waitClusterStarted();
1004+
1005+
restarter.restartOneDbNode(node1, false, true, true);
1006+
restarter.waitNodesNoStart(&node1, 1);
1007+
if (restarter.dumpStateOneNode(node1, dump0, 2))
1008+
return NDBT_FAILED;
1009+
1010+
restarter.startNodes(&node1, 1);
1011+
1012+
do {
1013+
1014+
for (Uint32 i = 0; i < 100; i++)
1015+
{
1016+
hugoTrans.pkReadRecords(pNdb, 100, 1, NdbOperation::LM_CommittedRead);
1017+
}
1018+
} while (restarter.waitClusterStarted(5) != 0);
1019+
1020+
if (restarter.dumpStateOneNode(node1, dump1, 1))
1021+
return NDBT_FAILED;
9721022
}
9731023

9741024
return NDBT_OK;
@@ -2075,6 +2125,9 @@ TESTCASE("Bug28023", ""){
20752125
TESTCASE("Bug28717", ""){
20762126
INITIALIZER(runBug28717);
20772127
}
2128+
TESTCASE("Bug29364", ""){
2129+
INITIALIZER(runBug29364);
2130+
}
20782131
NDBT_TESTSUITE_END(testNodeRestart);
20792132

20802133
int main(int argc, const char** argv){

storage/ndb/test/run-test/daily-basic-tests.txt

+4
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,10 @@ max-time: 1000
569569
cmd: testNodeRestart
570570
args: -n Bug28023 T7 D2
571571

572+
max-time: 1000
573+
cmd: testNodeRestart
574+
args: -n Bug29364 T1
575+
572576
#
573577
# DICT TESTS
574578
max-time: 1500

0 commit comments

Comments
 (0)