Documentation Home
MySQL Cluster API Developer Guide
Download this Manual
PDF (US Ltr) - 5.0Mb
PDF (A4) - 5.0Mb
EPUB - 1.9Mb
HTML Download (TGZ) - 1.9Mb
HTML Download (Zip) - 1.9Mb


3.2.5.3 ndb_mgm_dump_state()

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.

Important

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, “MySQL Cluster Management Client DUMP Commands”.

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);


User Comments
Sign Up Login You must be logged in to post a comment.