Like the other
functions, this function restarts one or more data nodes.
can be used to cause an initial restart, waiting restart,
and immediate (forced) restart on one or more MySQL Cluster
data nodes; like
ndb_mgm_stop3() it provides
for a way to check to see whether disconnection is required
prior to stopping a node. In addition, it is possible to
force the node to restart even if this would cause a restart
of the cluster.
This function was added in MySQL Cluster NDB 7.1.8.
int ndb_mgm_restart4 ( NdbMgmHandle
number, const int*
ndb_mgm_restart4() takes 7 parameters:
numberof nodes to be stopped. Use
0to stop all of the data nodes in the cluster.
listof the node IDs of the nodes to be stopped.
initialis true (
1), then each node undergoes an initial restart—that is, its file system is removed.
nostartis true, then the nodes are not actually started, but instead are left ready for a start command.
abortis true, then the nodes are forced to restart immediately without performing a graceful restart.
The value of
forcedetermines the action to be taken in the event that the loss of a given node due to restarting would cause an incomplete cluster.
1causes the node—and the entire cluster—to be restarted in such cases,
0means that the node will not be restarted.
Beginning with MySQL Cluster NDB 7.1.10, setting
forceequal to 1 also makes it possible to restart a node even while other nodes are starting. (Bug #58451)
true), this means the you must disconnect before you can apply the command to restart. For example, disconnecting is required when stopping the management server to which the handle is connected.
The number of nodes actually restarted;
-1 on failure.