List:Commits« Previous MessageNext Message »
From:kent Date:February 27 2007 7:24pm
Subject:bk commit into 5.1 tree (kent:1.2458)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of kent. When kent 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-02-27 20:24:43+01:00, kent@kent-amd64.(none) +5 -0
  Merge mysql.com:/home/kent/bk/mysql-5.1.16-release
  into  mysql.com:/home/kent/bk/mysql-5.1.16-build
  MERGE: 1.2447.1.10

  client/sql_string.h@stripped, 2007-02-27 20:24:39+01:00, kent@kent-amd64.(none) +0 -0
    Auto merged
    MERGE: 1.18.1.1

  storage/myisam/mi_open.c@stripped, 2007-02-27 20:24:39+01:00, kent@kent-amd64.(none) +0 -0
    Auto merged
    MERGE: 1.116.1.1

  storage/ndb/src/common/debugger/EventLogger.cpp@stripped, 2007-02-27 20:24:39+01:00, kent@kent-amd64.(none) +0 -0
    Auto merged
    MERGE: 1.36.1.3

  storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp@stripped, 2007-02-27 20:24:39+01:00, kent@kent-amd64.(none) +0 -0
    Auto merged
    MERGE: 1.137.1.3

  storage/ndb/test/ndbapi/testNodeRestart.cpp@stripped, 2007-02-27 20:24:39+01:00, kent@kent-amd64.(none) +0 -0
    Auto merged
    MERGE: 1.42.1.1

# 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:	kent
# Host:	kent-amd64.(none)
# Root:	/home/kent/bk/mysql-5.1.16-build/RESYNC

--- 1.37/storage/ndb/src/common/debugger/EventLogger.cpp	2007-02-27 20:24:48 +01:00
+++ 1.38/storage/ndb/src/common/debugger/EventLogger.cpp	2007-02-27 20:24:48 +01:00
@@ -608,21 +608,21 @@
   lenth = sizeof(TransporterErrorString)/sizeof(struct myTransporterError);
   for(i=0; i<lenth; i++)
   {
-    if(theData[2] == TransporterErrorString[i].errorNum)
+    if(theData[2] == (Uint32) TransporterErrorString[i].errorNum)
     {
       BaseString::snprintf(m_text, m_text_len,
-                          "Transporter to node %d reported error 0x%x: %s",
-                          theData[1],
-			  theData[2],
-                          TransporterErrorString[i].errorString);
+                           "Transporter to node %d reported error 0x%x: %s",
+                           theData[1],
+                           theData[2],
+                           TransporterErrorString[i].errorString);
       break;
     }
   }
   if(i == lenth)
     BaseString::snprintf(m_text, m_text_len,   
-                        "Transporter to node %d reported error 0x%x: unknown error",
-                          theData[1],
-			  theData[2]);
+                         "Transporter to node %d reported error 0x%x: unknown error",
+                         theData[1],
+                         theData[2]);
 }
 void getTextTransporterWarning(QQQQ) {
   getTextTransporterError(m_text, m_text_len, theData);
@@ -1043,6 +1043,7 @@
 }
 
 #ifdef NOT_USED
+
 static NdbOut&
 operator<<(NdbOut& out, const LogLevel & ll)
 {

--- 1.141/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2007-02-27 20:24:48 +01:00
+++ 1.142/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2007-02-27 20:24:48 +01:00
@@ -441,6 +441,7 @@
     else
     {
       jam();
+      cstartRecReq = 2;
       ndbrequire(c_redo_complete_fragments.isEmpty());
       StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend();
       conf->startingNodeId = getOwnNodeId();
@@ -11936,7 +11937,7 @@
     return;
   }
 
-  if (getNodeState().getNodeRestartInProgress() && cstartRecReq == ZFALSE)
+  if (getNodeState().getNodeRestartInProgress() && cstartRecReq < 2)
   {
     GCPSaveRef * const saveRef = (GCPSaveRef*)&signal->theData[0];
     saveRef->dihPtr = dihPtr;
@@ -12248,6 +12249,10 @@
     // Set the prev file to check if we shall close it.
     logFilePtr.i = logFilePtr.p->prevLogFile;
     ptrCheckGuard(logFilePtr, clogFileFileSize, logFileRecord);
+
+    logPartPtr.i = logFilePtr.p->logPartRec;
+    ptrCheckGuard(logPartPtr, clogPartFileSize, logPartRecord);
+
     exitFromInvalidate(signal);
     return;
   case LogFileRecord::CLOSING_INIT:
@@ -14017,7 +14022,7 @@
     return;
   }
 
-  if (c_lcp_restoring_fragments.isEmpty() && cstartRecReq == ZTRUE)
+  if (c_lcp_restoring_fragments.isEmpty() && cstartRecReq == 1)
   {
     jam();
     /* ----------------------------------------------------------------
@@ -14058,7 +14063,7 @@
   ndbrequire(req->receivingNodeId == cownNodeid);
 
   cnewestCompletedGci = cnewestGci;
-  cstartRecReq = ZTRUE;
+  cstartRecReq = 1;
   for (logPartPtr.i = 0; logPartPtr.i < 4; logPartPtr.i++) {
     ptrAss(logPartPtr, logPartRecord);
     logPartPtr.p->logPartNewestCompletedGCI = cnewestCompletedGci;
@@ -14072,6 +14077,7 @@
    *------------------------------------------------------------------------ */
   if(cstartType == NodeState::ST_INITIAL_NODE_RESTART){
     jam();
+    cstartRecReq = 2;
     StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend();
     conf->startingNodeId = getOwnNodeId();
     sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal, 
@@ -15893,6 +15899,7 @@
 	return;
       }
     }
+    cstartRecReq = 2;
     StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend();
     conf->startingNodeId = getOwnNodeId();
     sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal, 
@@ -16761,7 +16768,7 @@
     cnoActiveCopy = 0;
     ccurrentGcprec = RNIL;
     caddNodeState = ZFALSE;
-    cstartRecReq = ZFALSE;
+    cstartRecReq = 0;
     cnewestGci = 0;
     cnewestCompletedGci = 0;
     crestartOldestGci = 0;

--- 1.43/storage/ndb/test/ndbapi/testNodeRestart.cpp	2007-02-27 20:24:48 +01:00
+++ 1.44/storage/ndb/test/ndbapi/testNodeRestart.cpp	2007-02-27 20:24:48 +01:00
@@ -1353,6 +1353,68 @@
   return NDBT_OK;
 }
 
+int 
+runBug26450(NDBT_Context* ctx, NDBT_Step* step)
+{
+  Uint32 i;
+  int result = NDBT_OK;
+  int loops = ctx->getNumLoops();
+  int records = ctx->getNumRecords();
+  NdbRestarter res;
+  Ndb* pNdb = GETNDB(step);
+  
+  int node = res.getRandomNotMasterNodeId(rand());
+  Vector<int> nodes;
+  for (unsigned i = 0; i<res.getNumDbNodes(); i++)
+  {
+    if (res.getDbNodeId(i) != node)
+      nodes.push_back(res.getDbNodeId(i));
+  }
+  
+  if (res.restartAll())
+    return NDBT_FAILED;
+
+  if (res.waitClusterStarted())
+    return NDBT_FAILED;
+
+  ndbout_c("node: %d", node);
+  if (res.restartOneDbNode(node, false, true, true))
+    return NDBT_FAILED;
+  
+  if (res.waitNodesNoStart(&node, 1))
+    return NDBT_FAILED;
+
+  if (runClearTable(ctx, step))
+    return NDBT_FAILED;
+
+  for (i = 0; i < 2; i++)
+  {
+    if (res.restartAll(false, true, i > 0))
+      return NDBT_FAILED;
+    
+    if (res.waitClusterNoStart())
+      return NDBT_FAILED;
+    
+    if (res.startNodes(nodes.getBase(), nodes.size()))
+      return NDBT_FAILED;
+
+    if (res.waitNodesStarted(nodes.getBase(), nodes.size()))
+      return NDBT_FAILED;
+  }
+
+  if (res.startNodes(&node, 1))
+    return NDBT_FAILED;
+
+  if (res.waitNodesStarted(&node, 1))
+    return NDBT_FAILED;
+
+  HugoTransactions trans (* ctx->getTab());
+  if (trans.selectCount(pNdb) != 0)
+    return NDBT_FAILED;
+
+  return NDBT_OK;
+}
+
 NDBT_TESTSUITE(testNodeRestart);
 TESTCASE("NoLoad", 
 	 "Test that one node at a time can be stopped and then restarted "\
@@ -1696,6 +1758,10 @@
 }
 TESTCASE("Bug26481", ""){
   INITIALIZER(runBug26481);
+}
+TESTCASE("Bug26450", ""){
+  INITIALIZER(runLoadTable);
+  INITIALIZER(runBug26450);
 }
 NDBT_TESTSUITE_END(testNodeRestart);
 
Thread
bk commit into 5.1 tree (kent:1.2458)kent27 Feb