summaryrefslogtreecommitdiff
path: root/ndb/test
diff options
context:
space:
mode:
authorunknown <jonas@perch.ndb.mysql.com>2007-07-02 13:45:24 +0200
committerunknown <jonas@perch.ndb.mysql.com>2007-07-02 13:45:24 +0200
commit036eedbaed53f69ac0c029e13e01fd96f4ca9ebe (patch)
tree032df13add2f92a0ce8f2ea91f92decd35c024e7 /ndb/test
parent3b3586ee010b4ee15b235ba0fb03da272d20cfc5 (diff)
downloadmariadb-git-036eedbaed53f69ac0c029e13e01fd96f4ca9ebe.tar.gz
ndb - bug#29364 - "SQL queries hang while data node in start phase 5"
In TC init node status for already started nodes during node restart (not present in 5.1) ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: on node restart, make sure to init all already started nodes to NF_STARTED ndb/test/ndbapi/testNodeRestart.cpp: test prg ndb/test/run-test/daily-basic-tests.txt: test prg
Diffstat (limited to 'ndb/test')
-rw-r--r--ndb/test/ndbapi/testNodeRestart.cpp63
-rw-r--r--ndb/test/run-test/daily-basic-tests.txt4
2 files changed, 62 insertions, 5 deletions
diff --git a/ndb/test/ndbapi/testNodeRestart.cpp b/ndb/test/ndbapi/testNodeRestart.cpp
index c0bc8b7747c..848b305c01a 100644
--- a/ndb/test/ndbapi/testNodeRestart.cpp
+++ b/ndb/test/ndbapi/testNodeRestart.cpp
@@ -944,12 +944,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;
@@ -1553,6 +1603,9 @@ TESTCASE("Bug27003", ""){
TESTCASE("Bug27283", ""){
INITIALIZER(runBug27283);
}
+TESTCASE("Bug29364", ""){
+ INITIALIZER(runBug29364);
+}
NDBT_TESTSUITE_END(testNodeRestart);
int main(int argc, const char** argv){
diff --git a/ndb/test/run-test/daily-basic-tests.txt b/ndb/test/run-test/daily-basic-tests.txt
index 31dbe799b44..1d306fa711f 100644
--- a/ndb/test/run-test/daily-basic-tests.txt
+++ b/ndb/test/run-test/daily-basic-tests.txt
@@ -479,6 +479,10 @@ args: -n Bug24717 T1
max-time: 1000
cmd: testNodeRestart
+args: -n Bug29364 T1
+
+max-time: 1000
+cmd: testNodeRestart
args: -n Bug25364 T1
max-time: 1000