bug #8556 corrupt ndb_mgm show printout for certain configurations

parent 788f6b5a
...@@ -1069,16 +1069,19 @@ print_nodes(ndb_mgm_cluster_state *state, ndb_mgm_configuration_iterator *it, ...@@ -1069,16 +1069,19 @@ print_nodes(ndb_mgm_cluster_state *state, ndb_mgm_configuration_iterator *it,
} }
ndbout << ")" << endl; ndbout << ")" << endl;
} else { } else {
if(ndb_mgm_find(it, CFG_NODE_ID, node_id) != 0){ ndb_mgm_first(it);
ndbout_c("Unable to find node with id: %d", node_id); if(ndb_mgm_find(it, CFG_NODE_ID, node_id) == 0){
return;
}
const char *config_hostname= 0; const char *config_hostname= 0;
ndb_mgm_get_string_parameter(it, CFG_NODE_HOST, &config_hostname); ndb_mgm_get_string_parameter(it, CFG_NODE_HOST, &config_hostname);
if (config_hostname == 0 || config_hostname[0] == 0) if (config_hostname == 0 || config_hostname[0] == 0)
config_hostname= "any host"; config_hostname= "any host";
ndbout << " (not connected, accepting connect from " ndbout_c(" (not connected, accepting connect from %s)",
<< config_hostname << ")" << endl; config_hostname);
}
else
{
ndbout_c("Unable to find node with id: %d", node_id);
}
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment