diff options
author | unknown <jonas@perch.ndb.mysql.com> | 2005-12-13 11:58:46 +0100 |
---|---|---|
committer | unknown <jonas@perch.ndb.mysql.com> | 2005-12-13 11:58:46 +0100 |
commit | 1df94c9269417f30d97fc0ca0513787cd5b31d47 (patch) | |
tree | 3e04b54a60d35046ad00bcfcd397818668742f8f /ndb/test | |
parent | 4904fd3c166c458ce32e28d716e1e555f1ec202b (diff) | |
parent | 01c7bd20b9fc28530387eeb5e3165f9ad8535301 (diff) | |
download | mariadb-git-1df94c9269417f30d97fc0ca0513787cd5b31d47.tar.gz |
Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.0
into perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-push
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
Auto merged
Diffstat (limited to 'ndb/test')
-rw-r--r-- | ndb/test/ndbapi/testNodeRestart.cpp | 149 | ||||
-rw-r--r-- | ndb/test/run-test/daily-basic-tests.txt | 21 |
2 files changed, 170 insertions, 0 deletions
diff --git a/ndb/test/ndbapi/testNodeRestart.cpp b/ndb/test/ndbapi/testNodeRestart.cpp index 6ef3da2d760..92d6c1830ef 100644 --- a/ndb/test/ndbapi/testNodeRestart.cpp +++ b/ndb/test/ndbapi/testNodeRestart.cpp @@ -21,6 +21,7 @@ #include <NdbRestarter.hpp> #include <NdbRestarts.hpp> #include <Vector.hpp> +#include <signaldata/DumpStateOrd.hpp> int runLoadTable(NDBT_Context* ctx, NDBT_Step* step){ @@ -409,6 +410,132 @@ int runLateCommit(NDBT_Context* ctx, NDBT_Step* step){ return NDBT_OK; } +int runBug15587(NDBT_Context* ctx, NDBT_Step* step){ + int result = NDBT_OK; + int loops = ctx->getNumLoops(); + int records = ctx->getNumRecords(); + NdbRestarter restarter; + + Uint32 tableId = ctx->getTab()->getTableId(); + int dump[2] = { DumpStateOrd::LqhErrorInsert5042, 0 }; + dump[1] = tableId; + + int nodeId = restarter.getDbNodeId(1); + + ndbout << "Restart node " << nodeId << endl; + + if (restarter.restartOneDbNode(nodeId, + /** initial */ false, + /** nostart */ true, + /** abort */ true)) + return NDBT_FAILED; + + if (restarter.waitNodesNoStart(&nodeId, 1)) + return NDBT_FAILED; + + if (restarter.dumpStateOneNode(nodeId, dump, 2)) + return NDBT_FAILED; + + if (restarter.startNodes(&nodeId, 1)) + return NDBT_FAILED; + + if (restarter.waitNodesStarted(&nodeId, 1)) + return NDBT_FAILED; + + ctx->stopTest(); + return NDBT_OK; +} + +int runBug15632(NDBT_Context* ctx, NDBT_Step* step){ + int result = NDBT_OK; + int loops = ctx->getNumLoops(); + int records = ctx->getNumRecords(); + NdbRestarter restarter; + + int nodeId = restarter.getDbNodeId(1); + + ndbout << "Restart node " << nodeId << endl; + + if (restarter.restartOneDbNode(nodeId, + /** initial */ false, + /** nostart */ true, + /** abort */ true)) + return NDBT_FAILED; + + if (restarter.waitNodesNoStart(&nodeId, 1)) + return NDBT_FAILED; + + if (restarter.insertErrorInNode(nodeId, 7165)) + return NDBT_FAILED; + + if (restarter.startNodes(&nodeId, 1)) + return NDBT_FAILED; + + if (restarter.waitNodesStarted(&nodeId, 1)) + return NDBT_FAILED; + + if (restarter.restartOneDbNode(nodeId, + /** initial */ false, + /** nostart */ true, + /** abort */ true)) + return NDBT_FAILED; + + if (restarter.waitNodesNoStart(&nodeId, 1)) + return NDBT_FAILED; + + if (restarter.insertErrorInNode(nodeId, 7171)) + return NDBT_FAILED; + + if (restarter.startNodes(&nodeId, 1)) + return NDBT_FAILED; + + if (restarter.waitNodesStarted(&nodeId, 1)) + return NDBT_FAILED; + + ctx->stopTest(); + return NDBT_OK; +} + +int runBug15685(NDBT_Context* ctx, NDBT_Step* step){ + + Ndb* pNdb = GETNDB(step); + HugoOperations hugoOps(*ctx->getTab()); + NdbRestarter restarter; + + HugoTransactions hugoTrans(*ctx->getTab()); + if (hugoTrans.loadTable(GETNDB(step), 10) != 0){ + return NDBT_FAILED; + } + + if(hugoOps.startTransaction(pNdb) != 0) + goto err; + + if(hugoOps.pkUpdateRecord(pNdb, 0, 1, rand()) != 0) + goto err; + + if(hugoOps.execute_NoCommit(pNdb) != 0) + goto err; + + if (restarter.insertErrorInAllNodes(5100)) + return NDBT_FAILED; + + hugoOps.execute_Rollback(pNdb); + + if (restarter.waitClusterStarted() != 0) + goto err; + + if (restarter.insertErrorInAllNodes(0)) + return NDBT_FAILED; + + ctx->stopTest(); + return NDBT_OK; + +err: + ctx->stopTest(); + return NDBT_FAILED; +} + + NDBT_TESTSUITE(testNodeRestart); TESTCASE("NoLoad", "Test that one node at a time can be stopped and then restarted "\ @@ -558,6 +685,8 @@ TESTCASE("RestartNFDuringNR", INITIALIZER(runCheckAllNodesStarted); INITIALIZER(runLoadTable); STEP(runRestarts); + STEP(runPkUpdateUntilStopped); + STEP(runScanUpdateUntilStopped); FINALIZER(runScanReadVerify); FINALIZER(runClearTable); } @@ -647,6 +776,8 @@ TESTCASE("RestartNodeDuringLCP", INITIALIZER(runCheckAllNodesStarted); INITIALIZER(runLoadTable); STEP(runRestarts); + STEP(runPkUpdateUntilStopped); + STEP(runScanUpdateUntilStopped); FINALIZER(runScanReadVerify); FINALIZER(runClearTable); } @@ -671,6 +802,24 @@ TESTCASE("LateCommit", STEP(runLateCommit); FINALIZER(runClearTable); } +TESTCASE("Bug15587", + "Test bug with NF during NR"){ + INITIALIZER(runLoadTable); + STEP(runScanUpdateUntilStopped); + STEP(runBug15587); + FINALIZER(runClearTable); +} +TESTCASE("Bug15632", + "Test bug with NF during NR"){ + INITIALIZER(runLoadTable); + STEP(runBug15632); + FINALIZER(runClearTable); +} +TESTCASE("Bug15685", + "Test bug with NF during abort"){ + STEP(runBug15685); + 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 8b44594a9b5..59f51044b51 100644 --- a/ndb/test/run-test/daily-basic-tests.txt +++ b/ndb/test/run-test/daily-basic-tests.txt @@ -413,6 +413,27 @@ max-time: 500 cmd: testScan args: -n ScanParallelism +max-time: 500 +cmd: testNodeRestart +args: -n Bug15587 T1 + +max-time: 500 +cmd: testNodeRestart +args: -n Bug15632 T1 + +max-time: 500 +cmd: testNodeRestart +args: -n Bug15685 T1 + +# OLD FLEX +max-time: 500 +cmd: flexBench +args: -c 25 -t 10 + +max-time: 500 +cmd: flexHammer +args: -r 5 -t 32 + # # DICT TESTS max-time: 1500 |