diff --git a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp index 024d7bdb00c..3e030de959e 100644 --- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp +++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp @@ -10235,6 +10235,7 @@ void Dbtc::inithost(Signal* signal) hostptr.p->noOfWordsTCINDXCONF = 0; hostptr.p->noOfPackedWordsLqh = 0; hostptr.p->hostLqhBlockRef = calcLqhBlockRef(hostptr.i); + hostptr.p->m_nf_bits = 0; }//for c_alive_nodes.clear(); }//Dbtc::inithost() diff --git a/storage/ndb/test/ndbapi/testNodeRestart.cpp b/storage/ndb/test/ndbapi/testNodeRestart.cpp index 97b831963fc..99b72699762 100644 --- a/storage/ndb/test/ndbapi/testNodeRestart.cpp +++ b/storage/ndb/test/ndbapi/testNodeRestart.cpp @@ -963,12 +963,62 @@ int runBug24717(NDBT_Context* ctx, NDBT_Step* step){ restarter.startNodes(&nodeId, 1); - for (Uint32 i = 0; i < 100; i++) - { - hugoTrans.pkReadRecords(pNdb, 100, 1, NdbOperation::LM_CommittedRead); - } - + do { + for (Uint32 i = 0; i < 100; i++) + { + hugoTrans.pkReadRecords(pNdb, 100, 1, NdbOperation::LM_CommittedRead); + } + } while (restarter.waitClusterStarted(5) != 0); + } + + return NDBT_OK; +} + +int +runBug29364(NDBT_Context* ctx, NDBT_Step* step){ + int result = NDBT_OK; + int loops = ctx->getNumLoops(); + int records = ctx->getNumRecords(); + NdbRestarter restarter; + Ndb* pNdb = GETNDB(step); + + HugoTransactions hugoTrans(*ctx->getTab()); + + if (restarter.getNumDbNodes() < 4) + return NDBT_OK; + + int dump0[] = { 9000, 0 } ; + int dump1[] = { 9001, 0 } ; + Uint32 ownNode = refToNode(pNdb->getReference()); + dump0[1] = ownNode; + + for (; loops; loops --) + { + int node0 = restarter.getDbNodeId(rand() % restarter.getNumDbNodes()); + int node1 = restarter.getRandomNodeOtherNodeGroup(node0, rand()); + + restarter.restartOneDbNode(node0, false, true, true); + restarter.waitNodesNoStart(&node0, 1); + restarter.startNodes(&node0, 1); restarter.waitClusterStarted(); + + restarter.restartOneDbNode(node1, false, true, true); + restarter.waitNodesNoStart(&node1, 1); + if (restarter.dumpStateOneNode(node1, dump0, 2)) + return NDBT_FAILED; + + restarter.startNodes(&node1, 1); + + do { + + for (Uint32 i = 0; i < 100; i++) + { + hugoTrans.pkReadRecords(pNdb, 100, 1, NdbOperation::LM_CommittedRead); + } + } while (restarter.waitClusterStarted(5) != 0); + + if (restarter.dumpStateOneNode(node1, dump1, 1)) + return NDBT_FAILED; } return NDBT_OK; @@ -2075,6 +2125,9 @@ TESTCASE("Bug28023", ""){ TESTCASE("Bug28717", ""){ INITIALIZER(runBug28717); } +TESTCASE("Bug29364", ""){ + INITIALIZER(runBug29364); +} NDBT_TESTSUITE_END(testNodeRestart); int main(int argc, const char** argv){ diff --git a/storage/ndb/test/run-test/daily-basic-tests.txt b/storage/ndb/test/run-test/daily-basic-tests.txt index 91ce4ae54e3..ed4dbf67b20 100644 --- a/storage/ndb/test/run-test/daily-basic-tests.txt +++ b/storage/ndb/test/run-test/daily-basic-tests.txt @@ -569,6 +569,10 @@ max-time: 1000 cmd: testNodeRestart args: -n Bug28023 T7 D2 +max-time: 1000 +cmd: testNodeRestart +args: -n Bug29364 T1 + # # DICT TESTS max-time: 1500