Description.
This function can be used to dump debugging information to
the cluster log. The MySQL Cluster management client
DUMP command is a wrapper for this
function.
ndb_mgm_dump_state(), like the
DUMP command, can cause a running MySQL
Cluster to malfunction or even to fail completely if it is
used improperly. Be sure to consult the relevant
documentation before using this function. For more
information on the DUMP command, and for
a listing of current DUMP codes and their
effects, see Section 8.2, “DUMP Commands”.
This function became available in MySQL Cluster NDB 6.1.2.17 and MySQL Cluster NDB 6.3.19.
Signature.
int ndb_mgm_dump_state
(
NdbMgmHandle handle,
int nodeId,
const int* arguments,
int numberOfArguments,
struct ndb_mgm_reply* reply
)
Parameters. This function takes the following pararemeters:
A management server handle
(NdbMgmHandle)
The nodeId of a cluster data
node.
An array of arguments. The
first of these is the DUMP code to be
executed. Subsequent arguments can be passed in this array
if needed by or desired for the corresponding
DUMP command.
The numberOfArguments to be
passed.
An ndb_mgm_reply, which
contains a return code along with a response or error
message.
Return value.
0 on success; otherwise, an error code.
Example.
The following example has the same result as running
2 DUMP 1000 in the management client:
// [...] #include <mgmapi_debug.h> // [...] struct ndb_mgm_reply reply; int args[1]; int stat, arg_count, node_id; args[0] = 1000; arg_count = 1; node_id = 2; stat = ndb_mgm_dump_state(h, node_id, args, arg_count, &reply);