MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:gni Date:September 19 2006 8:27am
Subject:bk commit into 5.0 tree (gni:1.2250) BUG#20575
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of root. When root 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-19 16:25:31+08:00, gni@dev3-127.(none) +3 -0
  BUG#20575 If the stopped node ids are transmitted to ndbd, 
            the following start, stop and restart operations aren't execute correctly

  ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp@stripped, 2006-09-19 16:25:29+08:00, gni@dev3-127.(none) +26 -0
    Adding some source codes check node list whether or not stopped for STOP_REQ signal.
    If all of these nodes have stopped, then STOP_CONF signal will return. 

  ndb/src/mgmclient/CommandInterpreter.cpp@stripped, 2006-09-19 16:25:30+08:00, gni@dev3-127.(none) +1 -1
    Ensure ndb_mgm can only transmit the valid range node id to management server.
    if the node id is greater than MAX_NODES, management server will exit abnormally.

  ndb/src/mgmsrv/MgmtSrvr.cpp@stripped, 2006-09-19 16:25:30+08:00, gni@dev3-127.(none) +5 -0
    Ensure management server can only transmit the data node id to data node process.

# 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:	gni
# Host:	dev3-127.(none)
# Root:	/mnt/mysql/home/ngb/mysql-5.0/bug20575

--- 1.32/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp	2006-09-19 16:26:37 +08:00
+++ 1.33/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp	2006-09-19 16:26:37 +08:00
@@ -2273,7 +2273,33 @@
   {
     NdbNodeBitmask tmp;
     tmp.assign(NdbNodeBitmask::Size, stopReq.nodes);
+
+    NdbNodeBitmask ndbStopNodes;
+    ndbStopNodes.assign(NdbNodeBitmask::Size, stopReq.nodes);
+    ndbStopNodes.bitAND(ndbMask);
+    ndbStopNodes.copyto(NdbNodeBitmask::Size, stopReq.nodes);
+
     ndbMask.bitANDC(tmp);
+
+    bool allNodesStopped = true;
+    int i ;
+    for( i = 0; i<  NdbNodeBitmask::Size; i++ ){
+      if ( stopReq.nodes[i] != 0 ){
+        allNodesStopped = false;
+        break;
+      }
+    }
+  
+    if ( allNodesStopped ) {
+      StopConf * const stopConf = (StopConf *)&signal->theData[0];
+      stopConf->senderData = stopReq.senderData;
+      stopConf->nodeState  = (Uint32) NodeState::SL_NOTHING;
+      cntr.sendSignal(stopReq.senderRef, GSN_STOP_CONF, signal,
+                       StopConf::SignalLength, JBB);
+      stopReq.senderRef = 0;
+      return false;
+    }
+
   }
   else
   {

--- 1.68/ndb/src/mgmclient/CommandInterpreter.cpp	2006-09-19 16:26:37 +08:00
+++ 1.69/ndb/src/mgmclient/CommandInterpreter.cpp	2006-09-19 16:26:37 +08:00
@@ -1091,7 +1091,7 @@
       int node_id;
       if (convert(command_list[pos].c_str(), node_id))
       {
-        if (node_id <= 0) {
+        if (node_id <= 0 || node_id > MAX_NODES) {
           ndbout << "Invalid node ID: " << command_list[pos].c_str()
                  << "." << endl;
           DBUG_RETURN(true);

--- 1.106/ndb/src/mgmsrv/MgmtSrvr.cpp	2006-09-19 16:26:37 +08:00
+++ 1.107/ndb/src/mgmsrv/MgmtSrvr.cpp	2006-09-19 16:26:37 +08:00
@@ -1014,6 +1014,11 @@
     {
       nodeId= node_ids[i];
       ndbout << "asked to stop " << nodeId << endl;
+
+      if ((getNodeType(nodeId) != NDB_MGM_NODE_TYPE_MGM)
+          &&(getNodeType(nodeId) != NDB_MGM_NODE_TYPE_NDB))
+          return WRONG_PROCESS_TYPE;
+
       if (getNodeType(nodeId) != NDB_MGM_NODE_TYPE_MGM)
         nodes_to_stop.set(nodeId);
       else if (nodeId != getOwnNodeId())
Thread
bk commit into 5.0 tree (gni:1.2250) BUG#20575gni19 Sep