From: Date: January 11 2007 8:51pm Subject: bk commit into 5.0 tree (jonas:1.2282) BUG#25554 List-Archive: http://lists.mysql.com/commits/17981 X-Bug: 25554 Message-Id: <20070111195120.8412D68E89E@perch.ndb.mysql.com> Below is the list of changes that have just been committed into a local 5.0 repository of jonas. When jonas does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2007-01-11 20:51:16+01:00, jonas@stripped +4 -0 ndb - bug#25554 fix bug when master failure during nr (recommit against 5.0) ndb/src/kernel/blocks/dbdih/DbdihMain.cpp@stripped, 2007-01-11 20:51:15+01:00, jonas@stripped +2 -1 recommit against 5.0 ndb/src/kernel/blocks/qmgr/QmgrMain.cpp@stripped, 2007-01-11 20:51:15+01:00, jonas@stripped +21 -0 recommit against 5.0 ndb/test/ndbapi/testNodeRestart.cpp@stripped, 2007-01-11 20:51:15+01:00, jonas@stripped +53 -0 recommit against 5.0 ndb/test/run-test/daily-basic-tests.txt@stripped, 2007-01-11 20:51:15+01:00, jonas@stripped +4 -0 recommit against 5.0 # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: jonas # Host: perch.ndb.mysql.com # Root: /home/jonas/src/50-work --- 1.46/ndb/test/run-test/daily-basic-tests.txt 2007-01-11 20:51:20 +01:00 +++ 1.47/ndb/test/run-test/daily-basic-tests.txt 2007-01-11 20:51:20 +01:00 @@ -473,6 +473,10 @@ cmd: testNodeRestart args: -n Bug25364 T1 +max-time: 1000 +cmd: testNodeRestart +args: -n Bug25554 T1 + # OLD FLEX max-time: 500 cmd: flexBench --- 1.65/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-01-11 20:51:20 +01:00 +++ 1.66/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2007-01-11 20:51:20 +01:00 @@ -3555,7 +3555,6 @@ takeOverPtr.i = takeOverPtrI; ptrCheckGuard(takeOverPtr, MAX_NDB_NODES, takeOverRecord); - releaseTakeOver(takeOverPtrI); if ((takeOverPtr.p->toMasterStatus != TakeOverRecord::IDLE) && (takeOverPtr.p->toMasterStatus != TakeOverRecord::TO_WAIT_START_TAKE_OVER)) { jam(); @@ -3569,6 +3568,7 @@ }//if setAllowNodeStart(takeOverPtr.p->toStartingNode, true); initTakeOver(takeOverPtr); + releaseTakeOver(takeOverPtrI); }//Dbdih::endTakeOver() void Dbdih::releaseTakeOver(Uint32 takeOverPtrI) @@ -4710,6 +4710,7 @@ break; } ndbrequire(ok); + endTakeOver(takeOverPtr.i); }//if }//Dbdih::handleTakeOverNewMaster() --- 1.35/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 2007-01-11 20:51:20 +01:00 +++ 1.36/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp 2007-01-11 20:51:20 +01:00 @@ -2847,6 +2847,17 @@ systemErrorLab(signal, __LINE__); return; }//if + + if (getNodeState().startLevel < NodeState::SL_STARTED) + { + jam(); + CRASH_INSERTION(932); + char buf[100]; + BaseString::snprintf(buf, 100, "Node failure during restart"); + progError(__LINE__, NDBD_EXIT_SR_OTHERNODEFAILED, buf); + ndbrequire(false); + } + TnoFailedNodes = cnoFailedNodes; failReport(signal, failedNodePtr.i, (UintR)ZTRUE, aFailCause); if (cpresident == getOwnNodeId()) { @@ -2932,6 +2943,16 @@ systemErrorLab(signal, __LINE__); return; }//if + + if (getNodeState().startLevel < NodeState::SL_STARTED) + { + jam(); + CRASH_INSERTION(932); + char buf[100]; + BaseString::snprintf(buf, 100, "Node failure during restart"); + progError(__LINE__, NDBD_EXIT_SR_OTHERNODEFAILED, buf); + ndbrequire(false); + } guard0 = cnoPrepFailedNodes - 1; arrGuard(guard0, MAX_NDB_NODES); --- 1.25/ndb/test/ndbapi/testNodeRestart.cpp 2007-01-11 20:51:20 +01:00 +++ 1.26/ndb/test/ndbapi/testNodeRestart.cpp 2007-01-11 20:51:20 +01:00 @@ -995,6 +995,56 @@ return NDBT_OK; } +int runBug25554(NDBT_Context* ctx, NDBT_Step* step){ + + int result = NDBT_OK; + int loops = ctx->getNumLoops(); + int records = ctx->getNumRecords(); + NdbRestarter restarter; + + if (restarter.getNumDbNodes() < 4) + return NDBT_OK; + + for (int i = 0; i