Like the other
functions, this function stops one or more data nodes. Like
ndb_mgm_stop2(), it offers
the ability to specify whether the nodes should shut down
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 shut down even if this would cause the
cluster to become nonviable.
This function was added in MySQL Cluster NDB 7.1.8.
int ndb_mgm_stop4 ( NdbMgmHandle
number, const int*
ndb_mgm_stop4() takes 6 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.
The value of
abortdetermines how the nodes will be shut down.
1indicates the nodes will shut down immediately;
0indicates that the nodes will stop gracefully.
The value of
forcedetermines the action to be taken in the event that the shutdown of a given node would cause an incomplete cluster.
1causes the node—and the entire cluster—to be shut down in such cases,
0means the node will not be shut down.
Beginning with MySQL Cluster NDB 7.1.10, setting
forceequal to 1 also makes it possible to stop a node even while other nodes are starting. (Bug #58451)
true), this means the you must disconnect before you can apply the command to stop. For example, disconnecting is required when stopping the management server to which the handle is connected.
The number of nodes actually stopped; in the event of
-1 is returned.