diff options
author | unknown <jonas@perch.ndb.mysql.com> | 2006-12-01 10:33:28 +0100 |
---|---|---|
committer | unknown <jonas@perch.ndb.mysql.com> | 2006-12-01 10:33:28 +0100 |
commit | 9a22200e428a54a40ade1a245820075108c24558 (patch) | |
tree | aa0119e27e3fa4deb4e13ffe56a672e6f095d150 /storage | |
parent | 1360c578540f2bd6ca20434ba2dff59e651bc190 (diff) | |
parent | 61c5b80e9fe284f79cebd4f5b06480a604a2e883 (diff) | |
download | mariadb-git-9a22200e428a54a40ade1a245820075108c24558.tar.gz |
Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into perch.ndb.mysql.com:/home/jonas/src/51-work
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
Auto merged
storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp:
Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp:
Auto merged
storage/ndb/test/ndbapi/testNodeRestart.cpp:
merge
storage/ndb/test/run-test/daily-basic-tests.txt:
merge
Diffstat (limited to 'storage')
-rw-r--r-- | storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp | 22 | ||||
-rw-r--r-- | storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp | 3 | ||||
-rw-r--r-- | storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp | 2 | ||||
-rw-r--r-- | storage/ndb/test/ndbapi/testNodeRestart.cpp | 37 | ||||
-rw-r--r-- | storage/ndb/test/run-test/daily-basic-tests.txt | 4 |
5 files changed, 62 insertions, 6 deletions
diff --git a/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp b/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp index 701682c426e..f1d16f23f50 100644 --- a/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp +++ b/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp @@ -91,6 +91,7 @@ Cmvmi::Cmvmi(Block_context& ctx) : addRecSignal(GSN_DUMP_STATE_ORD, &Cmvmi::execDUMP_STATE_ORD); addRecSignal(GSN_TESTSIG, &Cmvmi::execTESTSIG); + addRecSignal(GSN_NODE_START_REP, &Cmvmi::execNODE_START_REP, true); subscriberPool.setSize(5); @@ -445,7 +446,8 @@ void Cmvmi::execOPEN_COMREQ(Signal* signal) if(len == 2){ #ifdef ERROR_INSERT - if (! (ERROR_INSERTED(9000) && c_error_9000_nodes_mask.get(tStartingNode))) + if (! ((ERROR_INSERTED(9000) || ERROR_INSERTED(9002)) + && c_error_9000_nodes_mask.get(tStartingNode))) #endif { globalTransporterRegistry.do_connect(tStartingNode); @@ -466,7 +468,8 @@ void Cmvmi::execOPEN_COMREQ(Signal* signal) jam(); #ifdef ERROR_INSERT - if (ERROR_INSERTED(9000) && c_error_9000_nodes_mask.get(i)) + if ((ERROR_INSERTED(9000) || ERROR_INSERTED(9002)) + && c_error_9000_nodes_mask.get(i)) continue; #endif @@ -1195,9 +1198,9 @@ Cmvmi::execDUMP_STATE_ORD(Signal* signal) } #ifdef ERROR_INSERT - if (arg == 9000) + if (arg == 9000 || arg == 9002) { - SET_ERROR_INSERT_VALUE(9000); + SET_ERROR_INSERT_VALUE(arg); for (Uint32 i = 1; i<signal->getLength(); i++) c_error_9000_nodes_mask.set(signal->theData[i]); } @@ -1244,6 +1247,17 @@ Cmvmi::execDUMP_STATE_ORD(Signal* signal) #endif }//Cmvmi::execDUMP_STATE_ORD() +void +Cmvmi::execNODE_START_REP(Signal* signal) +{ +#ifdef ERROR_INSERT + if (ERROR_INSERTED(9002) && signal->theData[0] == getOwnNodeId()) + { + signal->theData[0] = 9001; + execDUMP_STATE_ORD(signal); + } +#endif +} BLOCK_FUNCTIONS(Cmvmi) diff --git a/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp b/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp index 891ecc9610d..ed00b9ffd94 100644 --- a/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp +++ b/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp @@ -72,7 +72,8 @@ private: void handleSET_VAR_REQ(Signal* signal); void execTESTSIG(Signal* signal); - + void execNODE_START_REP(Signal* signal); + char theErrorMessage[256]; void sendSTTORRY(Signal* signal); diff --git a/storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp b/storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp index 48e19658f24..f448123531e 100644 --- a/storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp +++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp @@ -256,7 +256,7 @@ Dbdih::Dbdih(Block_context& ctx): addRecSignal(GSN_DICT_LOCK_CONF, &Dbdih::execDICT_LOCK_CONF); addRecSignal(GSN_DICT_LOCK_REF, &Dbdih::execDICT_LOCK_REF); - addRecSignal(GSN_NODE_START_REP, &Dbdih::execNODE_START_REP); + addRecSignal(GSN_NODE_START_REP, &Dbdih::execNODE_START_REP, true); addRecSignal(GSN_START_FRAGREF, &Dbdih::execSTART_FRAGREF); diff --git a/storage/ndb/test/ndbapi/testNodeRestart.cpp b/storage/ndb/test/ndbapi/testNodeRestart.cpp index 35d83295fe5..ddef9acca58 100644 --- a/storage/ndb/test/ndbapi/testNodeRestart.cpp +++ b/storage/ndb/test/ndbapi/testNodeRestart.cpp @@ -23,6 +23,7 @@ #include <Vector.hpp> #include <signaldata/DumpStateOrd.hpp> #include <Bitmask.hpp> +#include <RefConvert.hpp> int runLoadTable(NDBT_Context* ctx, NDBT_Step* step){ @@ -993,6 +994,39 @@ runBug24543(NDBT_Context* ctx, NDBT_Step* step){ { return NDBT_FAILED; } + return NDBT_OK; +} +int runBug24717(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()); + + int dump[] = { 9002, 0 } ; + Uint32 ownNode = refToNode(pNdb->getReference()); + dump[1] = ownNode; + + for (; loops; loops --) + { + int nodeId = restarter.getRandomNotMasterNodeId(rand()); + restarter.restartOneDbNode(nodeId, false, true, true); + restarter.waitNodesNoStart(&nodeId, 1); + + if (restarter.dumpStateOneNode(nodeId, dump, 2)) + return NDBT_FAILED; + + restarter.startNodes(&nodeId, 1); + + for (Uint32 i = 0; i < 100; i++) + { + hugoTrans.pkReadRecords(pNdb, 100, 1, NdbOperation::LM_CommittedRead); + } + + restarter.waitClusterStarted(); + } return NDBT_OK; } @@ -1321,6 +1355,9 @@ TESTCASE("Bug21271", STEP(runPkUpdateUntilStopped); FINALIZER(runClearTable); } +TESTCASE("Bug24717", ""){ + INITIALIZER(runBug24717); +} 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 3f300647819..89921203e8c 100644 --- a/storage/ndb/test/run-test/daily-basic-tests.txt +++ b/storage/ndb/test/run-test/daily-basic-tests.txt @@ -501,6 +501,10 @@ max-time: 1000 cmd: testIndex args: -n Bug21384 +max-time: 1000 +cmd: testNodeRestart +args: -n Bug24717 T1 + # # DICT TESTS max-time: 1500 |