summaryrefslogtreecommitdiff
path: root/ndb/test
diff options
context:
space:
mode:
authorunknown <jonas@perch.ndb.mysql.com>2006-06-01 08:24:05 +0200
committerunknown <jonas@perch.ndb.mysql.com>2006-06-01 08:24:05 +0200
commit49a4c85bdf4e0b00243197c660b398ed4233cb9d (patch)
tree545adaefb58924a8817623c62c80d125f089a040 /ndb/test
parent6087323433fb75fed57b48de0697c25a9ebddd7c (diff)
downloadmariadb-git-49a4c85bdf4e0b00243197c660b398ed4233cb9d.tar.gz
ndb - bug#20185
Dont be too aggressive in Dbtc::nodeFailCheckTransaction let it timeout by 1, so that it does not assert that it has waited too long old impl. set timeotu value to 0, making timeout = (ctcTimer - 0) which could be quite big. ndb/src/kernel/blocks/ERROR_codes.txt: error codes ndb/src/kernel/blocks/dbdih/DbdihMain.cpp: 2 new error inserts 7030 - delay in GCP_PREPARE until checkLocalNodefailComplete is true 7031 - delay in GCP_PREPARE and die ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: Dont set api con timer to 0, as this might trigger asserion in timeoutfound lab if state == PREPARE_TO_COMMIT ndb/test/ndbapi/testNodeRestart.cpp: testcase ndb/test/run-test/daily-basic-tests.txt: autotest
Diffstat (limited to 'ndb/test')
-rw-r--r--ndb/test/ndbapi/testNodeRestart.cpp56
-rw-r--r--ndb/test/run-test/daily-basic-tests.txt4
2 files changed, 60 insertions, 0 deletions
diff --git a/ndb/test/ndbapi/testNodeRestart.cpp b/ndb/test/ndbapi/testNodeRestart.cpp
index 7017aac0ade..68f101442c5 100644
--- a/ndb/test/ndbapi/testNodeRestart.cpp
+++ b/ndb/test/ndbapi/testNodeRestart.cpp
@@ -868,6 +868,56 @@ runBug18612SR(NDBT_Context* ctx, NDBT_Step* step){
return NDBT_OK;
}
+int runBug20185(NDBT_Context* ctx, NDBT_Step* step){
+ int result = NDBT_OK;
+ int loops = ctx->getNumLoops();
+ int records = ctx->getNumRecords();
+ NdbRestarter restarter;
+ HugoOperations hugoOps(*ctx->getTab());
+ Ndb* pNdb = GETNDB(step);
+
+ int dump[] = { 7090, 20 } ;
+ if (restarter.dumpStateAllNodes(dump, 2))
+ return NDBT_FAILED;
+
+ NdbSleep_MilliSleep(3000);
+
+ if(hugoOps.startTransaction(pNdb) != 0)
+ return NDBT_FAILED;
+
+ if(hugoOps.pkUpdateRecord(pNdb, 1, 1) != 0)
+ return NDBT_FAILED;
+
+ if (hugoOps.execute_NoCommit(pNdb) != 0)
+ return NDBT_FAILED;
+
+ int nodeId;
+ const int node = hugoOps.getTransaction()->getConnectedNodeId();
+ do {
+ nodeId = restarter.getDbNodeId(rand() % restarter.getNumDbNodes());
+ } while (nodeId == node);
+
+ if (restarter.insertErrorInAllNodes(7030))
+ return NDBT_FAILED;
+
+ if (restarter.insertErrorInNode(nodeId, 7031))
+ return NDBT_FAILED;
+
+ NdbSleep_MilliSleep(500);
+
+ if (hugoOps.execute_Commit(pNdb) == 0)
+ return NDBT_FAILED;
+
+ NdbSleep_MilliSleep(3000);
+
+ restarter.waitClusterStarted();
+
+ if (restarter.dumpStateAllNodes(dump, 1))
+ return NDBT_FAILED;
+
+ return NDBT_OK;
+}
+
NDBT_TESTSUITE(testNodeRestart);
TESTCASE("NoLoad",
@@ -1175,6 +1225,12 @@ TESTCASE("Bug18612SR",
STEP(runBug18612SR);
FINALIZER(runClearTable);
}
+TESTCASE("Bug20185",
+ ""){
+ INITIALIZER(runLoadTable);
+ STEP(runBug20185);
+ FINALIZER(runClearTable);
+}
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 508bf4c3d1e..e70dcafb249 100644
--- a/ndb/test/run-test/daily-basic-tests.txt
+++ b/ndb/test/run-test/daily-basic-tests.txt
@@ -470,6 +470,10 @@ max-time: 1000
cmd: testNodeRestart
args: -n Bug18612SR T1
+max-time: 1000
+cmd: testNodeRestart
+args: -n Bug20185 T1
+
# OLD FLEX
max-time: 500
cmd: flexBench