List:Commits« Previous MessageNext Message »
From:lzhou Date:August 15 2007 3:42pm
Subject:bk commit into 5.0 tree (lzhou:1.2477) BUG#29275
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of zhl. When zhl 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-08-15 13:41:46+00:00, lzhou@dev3-63.(none) +1 -0
  BUG#29275 Correct message when do restart

  ndb/src/mgmclient/CommandInterpreter.cpp@stripped, 2007-08-15 13:41:39+00:00,
lzhou@dev3-63.(none) +27 -2
    Remove prompting message for restart and add message for MGM node restart

# 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:	lzhou
# Host:	dev3-63.(none)
# Root:	/home/zhl/mysql/mysql-5.0/bug29275

--- 1.75/ndb/src/mgmclient/CommandInterpreter.cpp	2007-08-15 13:42:01 +00:00
+++ 1.76/ndb/src/mgmclient/CommandInterpreter.cpp	2007-08-15 13:42:01 +00:00
@@ -2026,8 +2026,33 @@ CommandInterpreter::executeRestart(Vecto
     return -1;
   }
 
-  if (!nostart)
-    ndbout_c("Shutting down nodes with \"-n, no start\" option, to subsequently start the
nodes.");
+  struct ndb_mgm_cluster_state *cl = ndb_mgm_get_status(m_mgmsrv);
+  if(cl == NULL) 
+  {
+    ndbout_c("Could not get status");
+    printError();
+    return -1;
+  }
+  NdbAutoPtr<char> ap1((char*)cl);
+
+  for (int i= 0; i < no_of_nodes; i++)
+  {
+    int j = 0;
+    while((j < cl->no_of_nodes) && cl->node_states[j].node_id !=
node_ids[i])
+      j++;
+    if(cl->node_states[j].node_id != node_ids[i]) 
+    {
+      ndbout << node_ids[i] << ": Node not found" << endl;
+      return -1;
+    }
+
+    if(cl->node_states[j].node_type == NDB_MGM_NODE_TYPE_MGM)
+    {
+      ndbout << "Shutting down MGM node";
+      ndbout << " " << node_ids[i];
+      ndbout_c(", for restart.");
+    }
+  }
 
   result= ndb_mgm_restart3(m_mgmsrv, no_of_nodes, node_ids,
                            initialstart, nostart, abort, &need_disconnect);
Thread
bk commit into 5.0 tree (lzhou:1.2477) BUG#29275lzhou15 Aug
  • Re: bk commit into 5.0 tree (lzhou:1.2477) BUG#29275Magnus Svensson11 Dec