Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas 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, 2008-03-14 14:25:30+01:00, tomas@stripped +1 -0
allow multi node ids also for START
storage/ndb/src/mgmclient/CommandInterpreter.cpp@stripped, 2008-03-14 14:25:28+01:00,
tomas@stripped +31 -1
allow multi node ids also for START
diff -Nrup a/storage/ndb/src/mgmclient/CommandInterpreter.cpp
b/storage/ndb/src/mgmclient/CommandInterpreter.cpp
--- a/storage/ndb/src/mgmclient/CommandInterpreter.cpp 2008-03-13 14:39:14 +01:00
+++ b/storage/ndb/src/mgmclient/CommandInterpreter.cpp 2008-03-14 14:25:28 +01:00
@@ -125,6 +125,8 @@ public:
int *node_ids, int no_of_nodes);
int executeRestart(Vector<BaseString> &command_list, unsigned command_pos,
int *node_ids, int no_of_nodes);
+ int executeStart(Vector<BaseString> &command_list, unsigned command_pos,
+ int *node_ids, int no_of_nodes);
int executeRep(char* parameters);
@@ -1280,8 +1282,13 @@ CommandInterpreter::executeCommand(Vecto
retval = executeRestart(command_list, command_pos+1, node_ids, no_of_nodes);
return retval;
}
+ if (strcasecmp("START", cmd) == 0)
+ {
+ retval = executeStart(command_list, command_pos+1, node_ids, no_of_nodes);
+ return retval;
+ }
ndbout_c("Invalid command: '%s' after multi node id list. "
- "Expected STOP or RESTART.", cmd);
+ "Expected STOP, START, or RESTART.", cmd);
return -1;
}
@@ -2035,6 +2042,29 @@ CommandInterpreter::executeStart(int pro
ndbout_c("Database node %d is being started.", processId);
}
return retval;
+}
+
+int
+CommandInterpreter::executeStart(Vector<BaseString> &command_list,
+ unsigned command_pos,
+ int *node_ids, int no_of_nodes)
+{
+ int result;
+ result= ndb_mgm_start(m_mgmsrv, no_of_nodes, node_ids);
+
+ if (result <= 0) {
+ ndbout_c("Start failed.");
+ printError();
+ return -1;
+ }
+ else
+ {
+ ndbout << "Node";
+ for (int i= 0; i < no_of_nodes; i++)
+ ndbout << " " << node_ids[i];
+ ndbout_c(" is being started");
+ }
+ return 0;
}
int
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2540) | tomas | 14 Mar |