List:Commits« Previous MessageNext Message »
From:tomas Date:February 13 2006 2:47pm
Subject:bk commit into 5.0 tree (tomas:1.2041) BUG#17325
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 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.2041 06/02/13 15:47:46 tomas@stripped +1 -0
  Bug #17325  	HA Testing: Node failed takeover for failed node (Array index out of range)
  wrong arrGuard, see MAX_REPLICAS+1 0n row 6457
  + changed all 4 constants to MAX_REPLICAS
  + moved some arrGuards out of loops for optim reasons

  ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
    1.90 06/02/13 15:47:37 tomas@stripped +14 -14
    Bug #17325  	HA Testing: Node failed takeover for failed node (Array index out of range)
    wrong arrGuard, see MAX_REPLICAS+1 0n row 6457
    + changed all 4 constants to MAX_REPLICAS
    + moved some arrGuards out of loops for optim reasons

# 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.0

--- 1.89/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2005-12-14 11:30:21 +01:00
+++ 1.90/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp	2006-02-13 15:47:37 +01:00
@@ -3045,7 +3045,7 @@
       /*       NODE IF POSSIBLE TO AVOID UNNECESSARY COMMUNICATION   */
       /*       WITH SIMPLE READS.                                    */
       /*-------------------------------------------------------------*/
-      arrGuard(tnoOfBackup, 4);
+      arrGuard(tnoOfBackup, MAX_REPLICAS);
       UintR Tindex;
       UintR TownNode = cownNodeid;
       for (Tindex = 1; Tindex <= tnoOfBackup; Tindex++) {
@@ -6302,7 +6302,7 @@
     jam();
     tcConnectptr.i = apiConnectptr.p->currentTcConnect;
     ptrCheckGuard(tcConnectptr, ctcConnectFilesize, tcConnectRecord);
-    arrGuard(apiConnectptr.p->currentReplicaNo, 4);
+    arrGuard(apiConnectptr.p->currentReplicaNo, MAX_REPLICAS);
     hostptr.i = tcConnectptr.p->tcNodedata[apiConnectptr.p->currentReplicaNo];
     ptrCheckGuard(hostptr, chostFilesize, hostRecord);
     if (hostptr.p->hostStatus == HS_ALIVE) {
@@ -6328,7 +6328,7 @@
     jam();
     tcConnectptr.i = apiConnectptr.p->currentTcConnect;
     ptrCheckGuard(tcConnectptr, ctcConnectFilesize, tcConnectRecord);
-    arrGuard(apiConnectptr.p->currentReplicaNo, 4);
+    arrGuard(apiConnectptr.p->currentReplicaNo, MAX_REPLICAS);
     hostptr.i = tcConnectptr.p->tcNodedata[apiConnectptr.p->currentReplicaNo];
     ptrCheckGuard(hostptr, chostFilesize, hostRecord);
     if (hostptr.p->hostStatus == HS_ALIVE) {
@@ -6354,7 +6354,7 @@
     jam();
     tcConnectptr.i = apiConnectptr.p->currentTcConnect;
     ptrCheckGuard(tcConnectptr, ctcConnectFilesize, tcConnectRecord);
-    arrGuard(apiConnectptr.p->currentReplicaNo, 4);
+    arrGuard(apiConnectptr.p->currentReplicaNo, MAX_REPLICAS);
     hostptr.i = tcConnectptr.p->tcNodedata[apiConnectptr.p->currentReplicaNo];
     ptrCheckGuard(hostptr, chostFilesize, hostRecord);
     if (hostptr.p->hostStatus == HS_ALIVE) {
@@ -6491,7 +6491,7 @@
       // in time to the ABORT signal we will declare it as dead.
       /*------------------------------------------------------------------*/
       UintR Ti = 0;
-      arrGuard(tcConnectptr.p->noOfNodes, 4);
+      arrGuard(tcConnectptr.p->noOfNodes, MAX_REPLICAS+1);
       for (Ti = 0; Ti < tcConnectptr.p->noOfNodes; Ti++) {
         jam();
         if (tcConnectptr.p->tcNodedata[Ti] != 0) {
@@ -7548,7 +7548,7 @@
     warningReport(signal, 18);
     return;
   }//if
-  arrGuard(apiConnectptr.p->currentReplicaNo, 4);
+  arrGuard(apiConnectptr.p->currentReplicaNo, MAX_REPLICAS);
   if (tcConnectptr.p->tcNodedata[apiConnectptr.p->currentReplicaNo] !=
       tnodeid) {
     warningReport(signal, 19);
@@ -7564,7 +7564,7 @@
   do {
     if (tcurrentReplicaNo != (Uint8)Z8NIL) {
       jam();
-      arrGuard(tcurrentReplicaNo, 4);
+      arrGuard(tcurrentReplicaNo, MAX_REPLICAS);
       const LqhTransConf::OperationStatus stat = 
 	(LqhTransConf::OperationStatus)
 	tcConnectptr.p->failData[tcurrentReplicaNo];
@@ -7698,7 +7698,7 @@
     warningReport(signal, 10);
     return;
   }//if
-  arrGuard(apiConnectptr.p->currentReplicaNo, 4);
+  arrGuard(apiConnectptr.p->currentReplicaNo, MAX_REPLICAS);
   if (tcConnectptr.p->tcNodedata[apiConnectptr.p->currentReplicaNo] !=
       tnodeid) {
     warningReport(signal, 11);
@@ -7718,7 +7718,7 @@
   do {
     if (tcurrentReplicaNo != (Uint8)Z8NIL) {
       jam();
-      arrGuard(tcurrentReplicaNo, 4);
+      arrGuard(tcurrentReplicaNo, MAX_REPLICAS);
       switch (tcConnectptr.p->failData[tcurrentReplicaNo]) {
       case LqhTransConf::InvalidStatus:
         jam();
@@ -7843,7 +7843,7 @@
     warningReport(signal, 14);
     return;
   }//if
-  arrGuard(apiConnectptr.p->currentReplicaNo, 4);
+  arrGuard(apiConnectptr.p->currentReplicaNo, MAX_REPLICAS);
   if (tcConnectptr.p->tcNodedata[apiConnectptr.p->currentReplicaNo] !=
       tnodeid) {
     warningReport(signal, 15);
@@ -7863,7 +7863,7 @@
   do {
     if (tcurrentReplicaNo != (Uint8)Z8NIL) {
       jam();
-      arrGuard(tcurrentReplicaNo, 4);
+      arrGuard(tcurrentReplicaNo, MAX_REPLICAS);
       switch (tcConnectptr.p->failData[tcurrentReplicaNo]) {
       case LqhTransConf::InvalidStatus:
         jam();
@@ -8152,6 +8152,7 @@
     case OS_PREPARED:
     case OS_COMMITTING:
       jam();
+      arrGuard(tcConnectptr.p->lastReplicaNo, MAX_REPLICAS);
       for (tindex = 0; tindex <= tcConnectptr.p->lastReplicaNo; tindex++) {
 	jam();
 	/*-------------------------------------------------------------------
@@ -8159,13 +8160,13 @@
 	 * IN THIS CASE ALL LQH'S ARE PREPARED AND WAITING FOR 
 	 * COMMIT/ABORT DECISION.                 
 	 *------------------------------------------------------------------*/
-	arrGuard(tindex, 4);
 	tcConnectptr.p->failData[tindex] = LqhTransConf::Prepared;
       }//for
       break;
     case OS_COMMITTED:
     case OS_COMPLETING:
       jam();
+      arrGuard(tcConnectptr.p->lastReplicaNo, MAX_REPLICAS);
       for (tindex = 0; tindex <= tcConnectptr.p->lastReplicaNo; tindex++) {
 	jam();
 	/*-------------------------------------------------------------------
@@ -8173,19 +8174,18 @@
 	 * IN THIS CASE ALL LQH'S ARE COMMITTED AND WAITING FOR 
 	 * COMPLETE MESSAGE.                     
 	 *------------------------------------------------------------------*/
-	arrGuard(tindex, 4);
 	tcConnectptr.p->failData[tindex] = LqhTransConf::Committed;
       }//for
       break;
     case OS_COMPLETED:
       jam();
+      arrGuard(tcConnectptr.p->lastReplicaNo, MAX_REPLICAS);
       for (tindex = 0; tindex <= tcConnectptr.p->lastReplicaNo; tindex++) {
 	jam();
 	/*-------------------------------------------------------------------
 	 * KEYDATA IS USED TO KEEP AN INDICATION OF STATE IN LQH. 
 	 * IN THIS CASE ALL LQH'S ARE COMPLETED.
 	 *-------------------------------------------------------------------*/
-	arrGuard(tindex, 4);
 	tcConnectptr.p->failData[tindex] = LqhTransConf::InvalidStatus;
       }//for
       break;
Thread
bk commit into 5.0 tree (tomas:1.2041) BUG#17325tomas13 Feb