List:Commits« Previous MessageNext Message »
From:jonas Date:December 1 2006 10:25am
Subject:bk commit into 5.0 tree (jonas:1.2274) BUG#24717
View as plain text  
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, 2006-12-01 10:25:11+01:00, jonas@stripped +5 -0
  ndb -
    add testcase for bug#24717
   + fix typo

  ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp@stripped, 2006-12-01 10:25:10+01:00,
jonas@stripped +18 -4
    Add new error insert 9002
      which is 9000, but will auto enable when started

  ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp@stripped, 2006-12-01 10:25:10+01:00,
jonas@stripped +2 -1
    Add new error insert 9002
      which is 9000, but will auto enable when started

  ndb/src/kernel/blocks/dbdih/DbdihInit.cpp@stripped, 2006-12-01 10:25:10+01:00,
jonas@stripped +1 -1
    Fix typo

  ndb/test/ndbapi/testNodeRestart.cpp@stripped, 2006-12-01 10:25:10+01:00,
jonas@stripped +39 -0
    add testcase for bug#24717

  ndb/test/run-test/daily-basic-tests.txt@stripped, 2006-12-01 10:25:10+01:00,
jonas@stripped +4 -0
    add testcase for bug#24717

# 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.42/ndb/test/run-test/daily-basic-tests.txt	2006-12-01 10:25:15 +01:00
+++ 1.43/ndb/test/run-test/daily-basic-tests.txt	2006-12-01 10:25:15 +01:00
@@ -457,6 +457,10 @@
 cmd: testIndex
 args: -n Bug21384
 
+max-time: 1000
+cmd: testNodeRestart
+args: -n Bug24717 T1
+
 # OLD FLEX
 max-time: 500
 cmd: flexBench

--- 1.27/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2006-12-01 10:25:15 +01:00
+++ 1.28/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp	2006-12-01 10:25:15 +01:00
@@ -91,6 +91,7 @@
   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);
 
@@ -423,7 +424,8 @@
   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);
@@ -444,7 +446,8 @@
 	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
 	
@@ -1142,9 +1145,9 @@
   }
 
 #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]);
   }
@@ -1191,6 +1194,17 @@
 #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)
 

--- 1.3/ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp	2006-12-01 10:25:15 +01:00
+++ 1.4/ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp	2006-12-01 10:25:15 +01:00
@@ -72,7 +72,8 @@
   void handleSET_VAR_REQ(Signal* signal);
 
   void execTESTSIG(Signal* signal);
-
+  void execNODE_START_REP(Signal* signal);
+  
   char theErrorMessage[256];
   void sendSTTORRY(Signal* signal);
 

--- 1.12/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp	2006-12-01 10:25:15 +01:00
+++ 1.13/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp	2006-12-01 10:25:15 +01:00
@@ -269,7 +269,7 @@
 
   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);
   
   apiConnectRecord = 0;  
   connectRecord = 0;  

--- 1.23/ndb/test/ndbapi/testNodeRestart.cpp	2006-12-01 10:25:15 +01:00
+++ 1.24/ndb/test/ndbapi/testNodeRestart.cpp	2006-12-01 10:25:15 +01:00
@@ -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){
 
@@ -919,6 +920,41 @@
   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;
+}
+
 
 NDBT_TESTSUITE(testNodeRestart);
 TESTCASE("NoLoad", 
@@ -1231,6 +1267,9 @@
   INITIALIZER(runLoadTable);
   STEP(runBug20185);
   FINALIZER(runClearTable);
+}
+TESTCASE("Bug24717", ""){
+  INITIALIZER(runBug24717);
 }
 NDBT_TESTSUITE_END(testNodeRestart);
 
Thread
bk commit into 5.0 tree (jonas:1.2274) BUG#24717jonas1 Dec