MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Leonard Zhou Date:December 11 2008 8:12am
Subject:bzr commit into mysql-5.1 branch (leonard:2792) Bug#29275
View as plain text  
#At file:///home/zhl/mysql/mysql-5.1-telco-6.3-bug29275/

 2792 Leonard Zhou	2008-12-11
      BUG#29275 Correct message when do restart
modified:
  storage/ndb/src/mgmclient/CommandInterpreter.cpp

per-file messages:
  storage/ndb/src/mgmclient/CommandInterpreter.cpp
    Correct message when do restart
=== modified file 'storage/ndb/src/mgmclient/CommandInterpreter.cpp'
--- a/storage/ndb/src/mgmclient/CommandInterpreter.cpp	2008-12-03 14:12:23 +0000
+++ b/storage/ndb/src/mgmclient/CommandInterpreter.cpp	2008-12-11 08:12:13 +0000
@@ -2193,8 +2193,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"
+	     << " " << node_ids[i] << " for restart" << endl;
+    }
+  }
 
   result= ndb_mgm_restart3(m_mgmsrv, no_of_nodes, node_ids,
                            initialstart, nostart, abort, &need_disconnect);

Thread
bzr commit into mysql-5.1 branch (leonard:2792) Bug#29275Leonard Zhou11 Dec