diff options
author | unknown <tomas@poseidon.(none)> | 2004-08-24 11:28:19 +0000 |
---|---|---|
committer | unknown <tomas@poseidon.(none)> | 2004-08-24 11:28:19 +0000 |
commit | 3dae7e9320b23b4ffafe9b546767f3cecf362ca3 (patch) | |
tree | 843b90767358b536c2f643ecb7efe19bdf4c8b5a /ndb | |
parent | 30f6acf44b1468478329abf0e087a288691999e7 (diff) | |
download | mariadb-git-3dae7e9320b23b4ffafe9b546767f3cecf362ca3.tar.gz |
some more printouts to SHOW command
mysql-test/ndb/ndbcluster.sh:
stop instead of kill
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/src/mgmclient/CommandInterpreter.cpp | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/ndb/src/mgmclient/CommandInterpreter.cpp b/ndb/src/mgmclient/CommandInterpreter.cpp index 8b9568fd12d..7175952aed0 100644 --- a/ndb/src/mgmclient/CommandInterpreter.cpp +++ b/ndb/src/mgmclient/CommandInterpreter.cpp @@ -649,9 +649,10 @@ CommandInterpreter::executeShow(char* parameters) } int - ndb_nodes = 0, - api_nodes = 0, - mgm_nodes = 0; + master_id= 0, + ndb_nodes= 0, + api_nodes= 0, + mgm_nodes= 0; for(i=0; i < state->no_of_nodes; i++) { switch(state->node_states[i].node_type) { @@ -659,6 +660,8 @@ CommandInterpreter::executeShow(char* parameters) api_nodes++; break; case NDB_MGM_NODE_TYPE_NDB: + if (state->node_states[i].dynamic_id > master_id) + master_id= state->node_states[i].dynamic_id; ndb_nodes++; break; case NDB_MGM_NODE_TYPE_MGM: @@ -681,8 +684,11 @@ CommandInterpreter::executeShow(char* parameters) ndbout << " (Version: " << getMajor(state->node_states[i].version) << "." << getMinor(state->node_states[i].version) << "." - << getBuild(state->node_states[i].version) << ")" << endl; - + << getBuild(state->node_states[i].version) << "," + << " Nodegroup: " << state->node_states[i].node_group; + if (state->node_states[i].dynamic_id == master_id) + ndbout << ", Master"; + ndbout << ")" << endl; } else { ndbout << " (not connected) " << endl; @@ -692,13 +698,13 @@ CommandInterpreter::executeShow(char* parameters) } ndbout << endl; - ndbout << api_nodes - << " API Node(s)" + ndbout << mgm_nodes + << " MGM Node(s)" << endl; for(i=0; i < state->no_of_nodes; i++) { - if(state->node_states[i].node_type == NDB_MGM_NODE_TYPE_API) { - ndbout << "API node:\t" << state->node_states[i].node_id; + if(state->node_states[i].node_type == NDB_MGM_NODE_TYPE_MGM) { + ndbout << "MGM node:\t" << state->node_states[i].node_id; if(state->node_states[i].version != 0) { ndbout << " (Version: " << getMajor(state->node_states[i].version) << "." @@ -707,19 +713,19 @@ CommandInterpreter::executeShow(char* parameters) } else { - ndbout << " (not connected) " << endl; + ndbout << " (no version information available) " << endl; } } } ndbout << endl; - - ndbout << mgm_nodes - << " MGM Node(s)" + + ndbout << api_nodes + << " API Node(s)" << endl; for(i=0; i < state->no_of_nodes; i++) { - if(state->node_states[i].node_type == NDB_MGM_NODE_TYPE_MGM) { - ndbout << "MGM node:\t" << state->node_states[i].node_id; + if(state->node_states[i].node_type == NDB_MGM_NODE_TYPE_API) { + ndbout << "API node:\t" << state->node_states[i].node_id; if(state->node_states[i].version != 0) { ndbout << " (Version: " << getMajor(state->node_states[i].version) << "." @@ -728,11 +734,12 @@ CommandInterpreter::executeShow(char* parameters) } else { - ndbout << " (no version information available) " << endl; + ndbout << " (not connected) " << endl; } } } ndbout << endl; + // ndbout << helpTextShow; return; } else if (strcmp(parameters, "PROPERTIES") == 0 || |