List:Commits« Previous MessageNext Message »
From:Leonard Zhou Date:December 12 2008 4:55am
Subject:bzr push into mysql-5.1 branch (leonard:2793)
View as plain text  
 2793 Leonard Zhou	2008-12-12 [merge]
      Merge
modified:
  sql/sql_yacc.yy

=== 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 push into mysql-5.1 branch (leonard:2793) Leonard Zhou12 Dec