List:Commits« Previous MessageNext Message »
From:David Li Date:September 7 2006 5:58am
Subject:bk commit into 5.0 tree (dli:1.2255) BUG#20395
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of dli. When dli 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-09-07 13:58:09+08:00, dli@stripped +4 -0
  Fix for Bug #20395 Cluster datanodes always assigned to nodegroup 0 during single user mode.
  Data node is not allowed to get added in the cluster when it is in single user mode.

  ndb/include/kernel/signaldata/CmRegSignalData.hpp@stripped, 2006-09-07 13:58:07+08:00, dli@stripped +4 -1
    Data node is not allowed to get added in the cluster when it is in single user mode.

  ndb/include/mgmapi/ndbd_exit_codes.h@stripped, 2006-09-07 13:58:07+08:00, dli@stripped +1 -0
    Data node is not allowed to get added in the cluster when it is in single user mode.

  ndb/src/kernel/blocks/qmgr/QmgrMain.cpp@stripped, 2006-09-07 13:58:07+08:00, dli@stripped +16 -0
    Data node is not allowed to get added in the cluster when it is in single user mode.

  ndb/src/kernel/error/ndbd_exit_codes.c@stripped, 2006-09-07 13:58:07+08:00, dli@stripped +2 -0
    Data node is not allowed to get added in the cluster when it is in single user mode.

# 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:	dli
# Host:	dev3-76.dev.cn.tlan
# Root:	/home/dli/mysql/mysql-5.0/mysql-5.0-bug-20395

--- 1.2/ndb/include/kernel/signaldata/CmRegSignalData.hpp	2006-09-07 13:58:15 +08:00
+++ 1.3/ndb/include/kernel/signaldata/CmRegSignalData.hpp	2006-09-07 13:58:15 +08:00
@@ -90,7 +90,10 @@
     ZNOT_PRESIDENT = 5, /* We are not president */
     ZNOT_DEAD = 6,       /* We are not dead when we are starting  */
     ZINCOMPATIBLE_VERSION = 7,
-    ZINCOMPATIBLE_START_TYPE = 8
+    ZINCOMPATIBLE_START_TYPE = 8,
+    ZSINGLE_USER_MODE = 9 /* The cluster is in single user mode,
+			   * data node is not allowed to get added
+			   * in the cluster while in single user mode */
   };
 private:
   

--- 1.34/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2006-09-07 13:58:15 +08:00
+++ 1.35/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp	2006-09-07 13:58:15 +08:00
@@ -699,6 +699,18 @@
     return;
   } 
   
+  if (getNodeState().getSingleUserMode()) 
+  {
+    jam(); 
+    /** 
+     * The cluster is in single user mode.
+     * Data node is not allowed to get added in the cluster 
+     * while in single user mode.
+     */
+    sendCmRegrefLab(signal, Tblockref, CmRegRef::ZSINGLE_USER_MODE);
+    return;
+  }//if
+
   ptrCheckGuard(addNodePtr, MAX_NDB_NODES, nodeRec);
   Phase phase = addNodePtr.p->phase;
   if (phase != ZINIT)
@@ -1092,6 +1104,10 @@
   case CmRegRef::ZNOT_DEAD:
     jam();
     progError(__LINE__, NDBD_EXIT_NODE_NOT_DEAD);
+    break;
+  case CmRegRef::ZSINGLE_USER_MODE:
+    jam();
+    progError(__LINE__, NDBD_EXIT_SINGLE_USER_MODE);
     break;
   case CmRegRef::ZELECTION:
     jam();

--- 1.10/ndb/include/mgmapi/ndbd_exit_codes.h	2006-09-07 13:58:15 +08:00
+++ 1.11/ndb/include/mgmapi/ndbd_exit_codes.h	2006-09-07 13:58:15 +08:00
@@ -78,6 +78,7 @@
 #define NDBD_EXIT_SR_RESTARTCONFLICT          2311
 #define NDBD_EXIT_NO_MORE_UNDOLOG             2312 
 #define NDBD_EXIT_SR_UNDOLOG                  2313 
+#define NDBD_EXIT_SINGLE_USER_MODE            2314 
 #define NDBD_EXIT_MEMALLOC                    2327
 #define NDBD_EXIT_BLOCK_JBUFCONGESTION        2334
 #define NDBD_EXIT_TIME_QUEUE_SHORT            2335

--- 1.12/ndb/src/kernel/error/ndbd_exit_codes.c	2006-09-07 13:58:15 +08:00
+++ 1.13/ndb/src/kernel/error/ndbd_exit_codes.c	2006-09-07 13:58:15 +08:00
@@ -68,6 +68,8 @@
     "No more free UNDO log, increase UndoIndexBuffer"},
    {NDBD_EXIT_SR_UNDOLOG, XFI,
     "Error while reading the datapages and UNDO log"},
+   {NDBD_EXIT_SINGLE_USER_MODE, XRE, "Data node is not allowed to get added "
+    "to the cluster while it is in single user mode"},
    {NDBD_EXIT_MEMALLOC, XCE, "Memory allocation failure, "
     "please decrease some configuration parameters"},
    {NDBD_EXIT_BLOCK_JBUFCONGESTION, XIE, "Job buffer congestion"},
Thread
bk commit into 5.0 tree (dli:1.2255) BUG#20395David Li7 Sep