MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:jonas Date:August 9 2006 2:24pm
Subject:bk commit into 4.1 tree (jonas:1.2542) BUG#21536
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 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, 2006-08-09 16:24:14+02:00, jonas@stripped +3 -0
  ndb - bug#21536
    Make sure updateNodeInfo is run on master also for temporary tables

  ndb/src/kernel/blocks/dbdih/DbdihMain.cpp@stripped, 2006-08-09 16:24:13+02:00, jonas@stripped +1 -0
    Run update nodeinfo also here to handle
      temprorary tables in some situations

  ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp@stripped, 2006-08-09 16:24:13+02:00, jonas@stripped +6 -1
    new error insert

  ndb/test/ndbapi/testSystemRestart.cpp@stripped, 2006-08-09 16:24:13+02:00, jonas@stripped +47 -0
    test case

# 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/41-work

--- 1.37/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2006-08-09 16:24:17 +02:00
+++ 1.38/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2006-08-09 16:24:17 +02:00
@@ -8338,6 +8338,7 @@ Dbdih::resetReplicaSr(TabRecordPtr tabPt
       }
       replicaPtr.i = nextReplicaPtrI;
     }//while
+    updateNodeInfo(fragPtr);
   }
 }
 

--- 1.17/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp	2006-08-09 16:24:17 +02:00
+++ 1.18/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp	2006-08-09 16:24:17 +02:00
@@ -2036,6 +2036,11 @@ void Ndbcntr::execSET_VAR_REQ(Signal* si
 void Ndbcntr::updateNodeState(Signal* signal, const NodeState& newState) const{
   NodeStateRep * const stateRep = (NodeStateRep *)&signal->theData[0];
 
+  if (newState.startLevel == NodeState::SL_STARTED)
+  {
+    CRASH_INSERTION(1000);
+  }
+
   stateRep->nodeState = newState;
   stateRep->nodeState.masterNodeId = cmasterNodeId;
   stateRep->nodeState.setNodeGroup(c_nodeGroup);
@@ -2826,7 +2831,7 @@ void Ndbcntr::Missra::sendNextSTTOR(Sign
       cntr.sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 3, JBB);
     }
   }
-  
+
   signal->theData[0] = EventReport::NDBStartCompleted;
   signal->theData[1] = NDB_VERSION;
   cntr.sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB);

--- 1.9/ndb/test/ndbapi/testSystemRestart.cpp	2006-08-09 16:24:17 +02:00
+++ 1.10/ndb/test/ndbapi/testSystemRestart.cpp	2006-08-09 16:24:17 +02:00
@@ -1121,6 +1121,46 @@ int runClearTable(NDBT_Context* ctx, NDB
   return NDBT_OK;
 }
 
+int 
+runBug21536(NDBT_Context* ctx, NDBT_Step* step)
+{
+  NdbRestarter restarter;
+  const Uint32 nodeCount = restarter.getNumDbNodes();
+  if(nodeCount != 2){
+    g_info << "Bug21536 - 2 nodes to test" << endl;
+    return NDBT_OK;
+  }
+
+  int node1 = restarter.getDbNodeId(rand() % nodeCount);
+  int node2 = restarter.getRandomNodeSameNodeGroup(node1, rand());
+
+  if (node1 == -1 || node2 == -1)
+    return NDBT_OK;
+  
+  int result = NDBT_OK;
+  do {
+    CHECK(restarter.restartOneDbNode(node1, false, true, true) == 0);
+    CHECK(restarter.waitNodesNoStart(&node1, 1) == 0);    
+    CHECK(restarter.insertErrorInNode(node1, 1000) == 0);    
+    int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 };
+    CHECK(restarter.dumpStateOneNode(node1, val2, 2) == 0);
+    CHECK(restarter.startNodes(&node1, 1) == 0);    
+    restarter.waitNodesStartPhase(&node1, 1, 3, 120);
+    CHECK(restarter.waitNodesNoStart(&node1, 1) == 0);    
+    
+    CHECK(restarter.restartOneDbNode(node2, true, true, true) == 0);
+    CHECK(restarter.waitNodesNoStart(&node2, 1) == 0);    
+    CHECK(restarter.startNodes(&node1, 1) == 0);   
+    CHECK(restarter.waitNodesStarted(&node1, 1) == 0);
+    CHECK(restarter.startNodes(&node2, 1) == 0);   
+    CHECK(restarter.waitClusterStarted() == 0);
+
+  } while(0);
+  
+  g_info << "Bug21536 finished" << endl;  
+  
+  return result;
+}
 
 NDBT_TESTSUITE(testSystemRestart);
 TESTCASE("SR1", 
@@ -1285,6 +1325,13 @@ TESTCASE("Bug18385", 
   INITIALIZER(runWaitStarted);
   INITIALIZER(runClearTable);
   STEP(runBug18385);
+  FINALIZER(runClearTable);
+}
+TESTCASE("Bug21536", 
+	 "Perform partition system restart with other nodes with higher GCI"){
+  INITIALIZER(runWaitStarted);
+  INITIALIZER(runClearTable);
+  STEP(runBug21536);
   FINALIZER(runClearTable);
 }
 NDBT_TESTSUITE_END(testSystemRestart);
Thread
bk commit into 4.1 tree (jonas:1.2542) BUG#21536jonas9 Aug