Below is the list of changes that have just been committed into a local
5.0 repository of root. When root 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, 2006-08-09 18:45:21+08:00, root@dev3-127.(none) +1 -0
BUG#19620 ndb_mgm help needs help
Help command has added for each command inside the ndb_mgm. There is only 1 file
changed
ndb/src/mgmclient/CommandInterpreter.cpp@stripped, 2006-08-09 18:43:52+08:00,
root@dev3-127.(none) +316 -2
Help command has added for each command inside the ndb_mgm.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: root
# Host: dev3-127.(none)
# Root: /mnt/mysql/home/ngb/bug19620
--- 1.61/ndb/src/mgmclient/CommandInterpreter.cpp 2006-08-09 18:46:31 +08:00
+++ 1.62/ndb/src/mgmclient/CommandInterpreter.cpp 2006-08-09 18:46:31 +08:00
@@ -259,7 +259,8 @@
" NDB Cluster -- Management Client -- Help\n"
"---------------------------------------------------------------------------\n"
"HELP Print help text\n"
-"HELP SHOW Help for SHOW command\n"
+// "HELP SHOW Help for SHOW command\n"
+"HELP COMMAND Print detailed help for COMMAND(e.g. SHOW)\n"
#ifdef HAVE_GLOBAL_REPLICATION
"HELP REPLICATION Help for global replication\n"
#endif // HAVE_GLOBAL_REPLICATION
@@ -299,13 +300,287 @@
" NDB Cluster -- Management Client -- Help for SHOW command\n"
"---------------------------------------------------------------------------\n"
"SHOW prints NDB Cluster information\n\n"
-"SHOW Print information about cluster\n"
+"SHOW Print information about cluster.The status reported is from\n"
+" the perspective of the data nodes. API and Management Server nodes\n"
+" are only reported as connected once the data nodes have started.\n"
#if 0
"SHOW CONFIG Print configuration (in initial config file format)\n"
"SHOW PARAMETERS Print information about configuration parameters\n\n"
#endif
;
+static const char* helpTextHelp =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for HELP command\n"
+"---------------------------------------------------------------------------\n"
+"HELP List available commands of NDB Cluster Management Client\n\n"
+"HELP List available commands.\n"
+;
+
+static const char* helpTextBackup =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for BACKUP command\n"
+"---------------------------------------------------------------------------\n"
+"BACKUP A backup is a snapshot of the database at a given time. \n"
+" The backup consists of three main parts:\n\n"
+" Metadata: the names and definitions of all database tables. \n"
+" Table records: the data actually stored in the database tables \n"
+" at the time that the backup was made.\n"
+" Transaction log: a sequential record telling how \n"
+" and when data was stored in the database.\n\n"
+" Backups are stored on each data node in the cluster that \n"
+" participates in the backup.\n\n"
+" The cluster log records backkup related events (such as \n"
+" backup started, aborted, finished).\n"
+;
+
+static const char* helpTextStartBackup =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for START BACKUP command\n"
+"---------------------------------------------------------------------------\n"
+"START BACKUP Start a cluster backup\n\n"
+"START BACKUP Start a backup for the cluster.\n"
+" Each backup gets an ID number that is reported to the\n"
+" user. This ID number can help you find the backup on the\n"
+" file system, or ABORT BACKUP if you wish to cancel a \n"
+" running backup.\n"
+;
+
+static const char* helpTextStartBackupNowait =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for START BACKUP NOWAIT command\n"
+"---------------------------------------------------------------------------\n"
+"START BACKUP NOWAIT Start a cluster backup and return immediately\n\n"
+"START BACKUP NOWAIT \n"
+" The management client will return control directly to\n"
+" the user without waiting for the backup to have started\n\n"
+" The status of the backup is recorded in the Cluster log.\n"
+;
+
+static const char* helpTextStartBackupWaitStarted =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for START BACKUP WAIT STARTED command\n"
+"---------------------------------------------------------------------------\n"
+"START BACKUP WAIT STARTED Start a cluster backup and return until the backup has
started\n\n"
+"START BACKUP WAIT STARTED \n"
+" The management client will wait for the backup to have\n"
+" started before returning control to the user.\n"
+;
+
+static const char* helpTextStartBackupWaitCompleted =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for START BACKUP WAIT COMPLETED command\n"
+"---------------------------------------------------------------------------\n"
+"START BACKUP WAIT COMPLETED Start a cluster backup and return until the backup has
completed\n\n"
+"START BACKUP WAIT COMPLETED \n"
+" The management client will wait for the backup to \n"
+" complete before returning control to the user.\n"
+;
+
+static const char* helpTextAbortBackup =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for ABORT BACKUP command\n"
+"---------------------------------------------------------------------------\n"
+"ABORT BACKUP Abort a cluster backup\n\n"
+"ABORT BACKUP <backup id> \n"
+" Abort a backup that is already in progress\n"
+" The backup id can be seen in the cluster log or in the\n"
+" output of the START BACKUP command.\n"
+;
+
+static const char* helpTextShutdown =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for SHUTDOWN command\n"
+"---------------------------------------------------------------------------\n"
+"SHUTDOWN Shutdown the cluster\n\n"
+"SHUTDOWN Shutdown the data nodes and management nodes.\n"
+" MySQL Servers and NDBAPI nodes are currently not \n"
+" shut down by issuing this command.\n"
+;
+
+static const char* helpTextClusterlogOn =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for CLUSTERLOG ON command\n"
+"---------------------------------------------------------------------------\n"
+"CLUSTERLOG ON Enable Cluster logging\n\n"
+"CLUSTERLOG ON [<severity>] ... \n"
+" Turn the cluster log on.\n"
+" It tells management server which severity levels messages will be
logged.\n"
+;
+
+static const char* helpTextClusterlogOff =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for CLUSTERLOG OFF command\n"
+"---------------------------------------------------------------------------\n"
+"CLUSTERLOG OFF Disable Cluster logging\n\n"
+"CLUSTERLOG OFF [<severity>] ... \n"
+" Turn the cluster log off.\n"
+" It tells management server which serverity levels logging will be
disabled.\n"
+;
+
+static const char* helpTextClusterlogToggle =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for CLUSTERLOG TOGGLE command\n"
+"---------------------------------------------------------------------------\n"
+"CLUSTERLOG TOGGLE Toggle severity filter on/off\n\n"
+"CLUSTERLOG TOGGLE [<severity>] ... \n"
+" Toggle serverity filter on/off.\n"
+" If a serverity level is already enabled,\n"
+" then it will be disabled after you use the command,vice versa.\n"
+;
+
+static const char* helpTextClusterlogInfo =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for CLUSTERLOG INFO command\n"
+"---------------------------------------------------------------------------\n"
+"CLUSTERLOG INFO Print cluster log information\n\n"
+"CLUSTERLOG INFO Display which severity levels have been enabled\n"
+" see HLEP CLUSTERLOG for list of the severity levels.\n"
+;
+
+static const char* helpTextStart =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for START command\n"
+"---------------------------------------------------------------------------\n"
+"START Start DB node (started with -n)\n\n"
+"<id> START Start the data node identified by <id>.\n"
+" If you want to start node <id> successfully,\n"
+" it is necessary that you run 'ndbd -n' command \n"
+" in the node <id> firstly.\n\n"
+" -n (--nostart) restarts the node but does not \n"
+" make it join the cluster. Use '<id> START' to start the
node.\n"
+;
+
+static const char* helpTextRestart =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for RESTART command\n"
+"---------------------------------------------------------------------------\n"
+"RESTART Restart DB node\n\n"
+"<id> RESTART [-n] [-i] \n"
+" Restart the data node <id>(or All data nodes).\n\n"
+" -n (--nostart) restarts the node but does not\n"
+" make it join the cluster. Use '<id> START' to\n"
+" start the node.\n\n"
+" -i (--initial) perform initial start.\n"
+" This cleans the file system (ndb_<id>_fs)\n"
+" and the node will copy data from another node\n"
+" in the same node group during start up.\n\n"
+" Consult the documentation before using -i.\n"
+;
+
+static const char* helpTextStop =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for STOP command\n"
+"---------------------------------------------------------------------------\n"
+"STOP Stop DB node\n\n"
+"<id> STOP Stop the data or management server node <id>\n\n"
+" ALL STOP will just stop all data nodes.\n\n"
+" If you desire to also shut down mangement servers,\n"
+" use SHUTDOWN instead.\n"
+;
+
+static const char* helpTextEnterSingleUserMode =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for ENTER SINGLE USER MODE command\n"
+"---------------------------------------------------------------------------\n"
+"ENTER SINGLE USER MODE Enter single user mode\n\n"
+"ENTER SINGLE USER MODE <api-node> \n"
+" Enters single-user mode, whereby only the MySQL server\n"
+" identified by the node ID node_id is allowed to access the database.
\n"
+;
+
+static const char* helpTextExitSingleUserMode =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for EXIT SINGLE USER MODE command\n"
+"---------------------------------------------------------------------------\n"
+"EXIT SINGLE USER MODE Exit single user mode\n\n"
+"EXIT SINGLE USER MODE \n"
+" Exits single-user mode, allowing all SQL nodes \n"
+" (that is, all running mysqld processes) to access the database. \n"
+;
+
+static const char* helpTextStatus =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for STATUS command\n"
+"---------------------------------------------------------------------------\n"
+"STATUS Print status\n\n"
+"<id> STATUS Displays status information for the node <id>\n"
+" or for All data nodes. \n\n"
+" e.g.\n"
+" ALL STATUS\n"
+" 1 STATUS\n\n"
+" When a node is starting, the start phase will be\n"
+" listed.\n\n"
+" Start Phase Meaning\n"
+" 1 foo\n"
+" 2 bar\n"
+"(check manual or mail dev-ndb for list of start phase and what occurs in them)\n"
+;
+
+static const char* helpTextClusterlog =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for CLUSTERLOG command\n"
+"---------------------------------------------------------------------------\n"
+"CLUSTERLOG Set log level for cluster log\n\n"
+" <id> CLUSTERLOG {<category>=<level>}+ \n"
+" Logs <category> events with priority less than \n"
+" or equal to <level> in the cluster log.\n\n"
+" <category> can be any one of the following values:\n"
+" STARTUP, SHUTDOWN, STATISTICS, CHECKPOINT, NODERESTART,\n"
+" CONNECTION, ERROR, INFO, CONGESTION, DEBUG, or BACKUP. \n\n"
+" <level> is represented by one of the numbers \n"
+" from 1 to 15 inclusive, where 1 indicates 'most important' \n"
+" and 15 'least important'.\n\n"
+" <severity > can be any one of the following values:\n"
+" ALERT, CRITICAL, ERROR, WARNING, INFO, DEBUG.\n"
+;
+
+
+static const char* helpTextPurgeStaleSessions =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for PURGE STALE SESSIONS command\n"
+"---------------------------------------------------------------------------\n"
+"PURGE STALE SESSIONS Reset reserved nodeid's in the mgmt server\n\n"
+"PURGE STALE SESSIONS \n"
+" Running this statement forces all reserved \n"
+" node IDs to be checked; any that are not \n"
+" being used by nodes acutally connected to \n"
+" the cluster are then freed.\n\n"
+" This command is not normally needed, but may be\n"
+" required in some situations where failed nodes \n"
+" cannot rejoin the cluster due to failing to\n"
+" allocate a node id.\n"
+;
+
+static const char* helpTextConnect =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for CONNECT command\n"
+"---------------------------------------------------------------------------\n"
+"CONNECT Connect to management server (reconnect if already connected)\n\n"
+"CONNECT [<connectstring>] \n"
+" Connect to management server\n"
+" The optinal parameter connectstring specifies the \n"
+" connect string to user.\n\n"
+" A connect string may be:\n"
+" mgm-server\n"
+" mgm-server:port\n"
+" mgm1:port,mgm2:port\n"
+" With multiple management servers comma separated.\n"
+" The management client with try to connect to the \n"
+" management severs in the order they are listed.\n\n"
+" If no connect string is specified, the default \n"
+" is used.\n"
+;
+
+static const char* helpTextQuit =
+"---------------------------------------------------------------------------\n"
+" NDB Cluster -- Management Client -- Help for QUIT command\n"
+"---------------------------------------------------------------------------\n"
+"QUIT Quit management client\n\n"
+"QUIT Terminates the management client \n"
+;
+
+
#ifdef HAVE_GLOBAL_REPLICATION
static const char* helpTextRep =
"---------------------------------------------------------------------------\n"
@@ -1024,8 +1299,47 @@
ndbout << "<level> = " << "0 - 15" << endl;
ndbout << "<id> = " << "ALL | Any database node id" <<
endl;
ndbout << endl;
+ ndbout << "If you want to get detailed information about each command, please
use 'help command' " << endl;
} else if (strcasecmp(parameters, "SHOW") == 0) {
ndbout << helpTextShow;
+ } else if ( strcasecmp(parameters, "HELP") == 0) {
+ ndbout << helpTextHelp;
+ } else if ( strcasecmp(parameters, "BACKUP") == 0) {
+ ndbout << helpTextBackup;
+ } else if ( strcasecmp(parameters, "START BACKUP") == 0) {
+ ndbout << helpTextStartBackup;
+ } else if ( strcasecmp(parameters, "ABORT BACKUP") == 0) {
+ ndbout << helpTextAbortBackup;
+ } else if ( strcasecmp(parameters, "SHUTDOWN") == 0) {
+ ndbout << helpTextShutdown;
+ } else if ( strcasecmp(parameters, "CLUSTERLOG ON") == 0) {
+ ndbout << helpTextClusterlogOn;
+ } else if ( strcasecmp(parameters, "CLUSTERLOG OFF") == 0) {
+ ndbout << helpTextClusterlogOff;
+ } else if ( strcasecmp(parameters, "CLUSTERLOG TOGGLE") == 0) {
+ ndbout << helpTextClusterlogToggle;
+ } else if ( strcasecmp(parameters, "CLUSTERLOG INFO") == 0) {
+ ndbout << helpTextClusterlogInfo;
+ } else if ( strcasecmp(parameters, "START") == 0) {
+ ndbout << helpTextStart;
+ } else if ( strcasecmp(parameters, "RESTART") == 0) {
+ ndbout << helpTextRestart;
+ } else if ( strcasecmp(parameters, "STOP") == 0) {
+ ndbout << helpTextStop;
+ } else if ( strcasecmp(parameters, "ENTER SINGLE USER MODE") == 0) {
+ ndbout << helpTextEnterSingleUserMode;
+ } else if ( strcasecmp(parameters, "EXIT SINGLE USER MODE") == 0) {
+ ndbout << helpTextExitSingleUserMode;
+ } else if ( strcasecmp(parameters, "STATUS") == 0) {
+ ndbout << helpTextStatus;
+ } else if ( strcasecmp(parameters, "CLUSTERLOG") == 0) {
+ ndbout << helpTextClusterlog;
+ } else if ( strcasecmp(parameters, "PURGE STALE SESSIONS") == 0) {
+ ndbout << helpTextPurgeStaleSessions;
+ } else if ( strcasecmp(parameters, "CONNECT") == 0) {
+ ndbout << helpTextConnect;
+ } else if ( strcasecmp(parameters, "QUIT") == 0) {
+ ndbout << helpTextQuit;
#ifdef HAVE_GLOBAL_REPLICATION
} else if (strcasecmp(parameters, "REPLICATION") == 0 ||
strcasecmp(parameters, "REP") == 0) {
| Thread |
|---|
| • bk commit into 5.0 tree (root:1.2243) BUG#19620 | gni | 10 Aug |