From: Date: December 20 2005 10:06am Subject: bk commit into 5.1 tree (tomas:1.1959) BUG#15685 List-Archive: http://lists.mysql.com/internals/33282 X-Bug: 15685 Message-Id: <20051220090603.05E5281370@poseidon.mysql.com> Below is the list of changes that have just been committed into a local 5.1 repository of tomas. When tomas 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 1.1959 05/12/20 10:05:52 tomas@stripped +2 -0 bug#15587, bug#15878, bug#15632, BUG#15685 storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 1.94 05/12/20 10:05:43 tomas@stripped +1 -1 BUG#15685 storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 1.39 05/12/20 10:05:43 tomas@stripped +26 -4 bug#15587, bug#15878, bug#15632 # 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: tomas # Host: poseidon.ndb.mysql.com # Root: /home/tomas/mysql-5.1-wl2325-5.0 --- 1.38/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2005-10-07 10:58:00 +02:00 +++ 1.39/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp 2005-12-20 10:05:43 +01:00 @@ -215,7 +215,7 @@ signal->theData[2] = c_nodeStartMaster.failNr; signal->theData[3] = 0; signal->theData[4] = currentgcp; - sendSignal(nodeDihRef, GSN_INCL_NODEREQ, signal, 5, JBB); + sendSignal(nodeDihRef, GSN_INCL_NODEREQ, signal, 5, JBA); }//Dbdih::sendINCL_NODEREQ() void Dbdih::sendMASTER_GCPREQ(Signal* signal, Uint32 nodeId) @@ -1863,6 +1863,7 @@ // global checkpoint id and the correct state. We do not wait for any reply // since the starting node will not send any. /*-------------------------------------------------------------------------*/ + c_INCL_NODEREQ_Counter.setWaitingFor(c_nodeStartMaster.startNode); sendINCL_NODEREQ(signal, c_nodeStartMaster.startNode); }//Dbdih::gcpBlockedLab() @@ -2065,6 +2066,13 @@ jamEntry(); Uint32 retRef = signal->theData[0]; Uint32 nodeId = signal->theData[1]; + if (nodeId == getOwnNodeId() && ERROR_INSERTED(7165)) + { + CLEAR_ERROR_INSERT_VALUE; + sendSignalWithDelay(reference(), GSN_INCL_NODEREQ, signal, 5000, + signal->getLength()); + return; + } Uint32 tnodeStartFailNr = signal->theData[2]; currentgcp = signal->theData[4]; CRASH_INSERTION(7127); @@ -2092,6 +2100,9 @@ // id's and the lcp status. /*-----------------------------------------------------------------------*/ CRASH_INSERTION(7171); + signal->theData[0] = getOwnNodeId(); + signal->theData[1] = getOwnNodeId(); + sendSignal(cmasterdihref, GSN_INCL_NODECONF, signal, 2, JBB); return; }//if if (getNodeStatus(nodeId) != NodeRecord::STARTING) { @@ -5189,15 +5200,16 @@ /** * For each of replica record */ - Uint32 replicaNo = 0; + bool found = false; ReplicaRecordPtr replicaPtr; for(replicaPtr.i = fragPtr.p->storedReplicas; replicaPtr.i != RNIL; - replicaPtr.i = replicaPtr.p->nextReplica, replicaNo++) { + replicaPtr.i = replicaPtr.p->nextReplica) { jam(); ptrCheckGuard(replicaPtr, creplicaFileSize, replicaRecord); if(replicaPtr.p->procNode == nodeId){ jam(); + found = true; noOfRemovedReplicas++; removeNodeFromStored(nodeId, fragPtr, replicaPtr); if(replicaPtr.p->lcpOngoingFlag){ @@ -5213,6 +5225,15 @@ } } } + if (!found) + { + jam(); + /** + * Run updateNodeInfo to remove any dead nodes from list of activeNodes + * see bug#15587 + */ + updateNodeInfo(fragPtr); + } noOfRemainingLcpReplicas += fragPtr.p->noLcpReplicas; } @@ -8284,7 +8305,8 @@ *--------_----------------------------------------------------- */ const Uint32 nextCrashed = noCrashedReplicas + 1; replicaPtr.p->noCrashedReplicas = nextCrashed; - arrGuard(nextCrashed, 8); + arrGuardErr(nextCrashed, 8, + NDBD_EXIT_MAX_CRASHED_REPLICAS); replicaPtr.p->createGci[nextCrashed] = newestRestorableGCI + 1; ndbrequire(newestRestorableGCI + 1 != 0xF1F1F1F1); replicaPtr.p->replicaLastGci[nextCrashed] = (Uint32)-1; --- 1.93/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2005-10-07 10:58:03 +02:00 +++ 1.94/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2005-12-20 10:05:43 +01:00 @@ -6455,9 +6455,9 @@ } warningEvent(buf); ndbout_c(buf); + releaseAbortResources(signal); ndbrequire(false); } - releaseAbortResources(signal); return; }//if TloopCount++;