diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2005-02-16 21:54:35 +0100 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2005-02-16 21:54:35 +0100 |
commit | 600e432143664fb90593b934123a538070a8f8a3 (patch) | |
tree | 1ae20468f279c6f972a8165990b58cdae73b0569 /ndb/src/mgmclient | |
parent | e5934af1664c3d90474a9b4cbaaea076335f1c33 (diff) | |
download | mariadb-git-600e432143664fb90593b934123a538070a8f8a3.tar.gz |
bug #8556 corrupt ndb_mgm show printout for certain configurations
Diffstat (limited to 'ndb/src/mgmclient')
-rw-r--r-- | ndb/src/mgmclient/CommandInterpreter.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/ndb/src/mgmclient/CommandInterpreter.cpp b/ndb/src/mgmclient/CommandInterpreter.cpp index 025bed2bc09..c3b0ee7fe97 100644 --- a/ndb/src/mgmclient/CommandInterpreter.cpp +++ b/ndb/src/mgmclient/CommandInterpreter.cpp @@ -1069,16 +1069,19 @@ print_nodes(ndb_mgm_cluster_state *state, ndb_mgm_configuration_iterator *it, } ndbout << ")" << endl; } else { - if(ndb_mgm_find(it, CFG_NODE_ID, node_id) != 0){ + ndb_mgm_first(it); + if(ndb_mgm_find(it, CFG_NODE_ID, node_id) == 0){ + const char *config_hostname= 0; + ndb_mgm_get_string_parameter(it, CFG_NODE_HOST, &config_hostname); + if (config_hostname == 0 || config_hostname[0] == 0) + config_hostname= "any host"; + ndbout_c(" (not connected, accepting connect from %s)", + config_hostname); + } + else + { ndbout_c("Unable to find node with id: %d", node_id); - return; } - const char *config_hostname= 0; - ndb_mgm_get_string_parameter(it, CFG_NODE_HOST, &config_hostname); - if (config_hostname == 0 || config_hostname[0] == 0) - config_hostname= "any host"; - ndbout << " (not connected, accepting connect from " - << config_hostname << ")" << endl; } } } |