List:Commits« Previous MessageNext Message »
From:Leonard Zhou Date:December 12 2008 4:48am
Subject:bzr push into mysql-5.1 branch (leonard:3170 to 3171)
View as plain text  
 3171 Leonard Zhou	2008-12-12 [merge]
      Merge 63 to 64
modified:
  storage/ndb/src/mgmclient/CommandInterpreter.cpp

 3170 Tomas Ulin	2008-12-12
      post merge fixes
modified:
  mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test
  mysql-test/suite/ndb/t/ndb_alter_table_online.test
  mysql-test/suite/ndb/t/ndb_dd_ddl.test
  mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test
  mysql-test/suite/rpl_ndb/t/rpl_ndb_bank.test

=== modified file 'storage/ndb/src/mgmclient/CommandInterpreter.cpp'
--- a/storage/ndb/src/mgmclient/CommandInterpreter.cpp	2008-12-03 14:14:38 +0000
+++ b/storage/ndb/src/mgmclient/CommandInterpreter.cpp	2008-12-12 04:45:10 +0000
@@ -2231,8 +2231,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:3170 to 3171) Leonard Zhou12 Dec