diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2004-11-30 12:02:53 +0000 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2004-11-30 12:02:53 +0000 |
commit | 07ed8294fa83e1c5acd3ecc4691667690e578581 (patch) | |
tree | 9e994ebd29b93f915f209718d9835e481c09d3c8 /ndb/src/mgmclient/CommandInterpreter.cpp | |
parent | 3eada05db21329d7a295994c075241927e58fc83 (diff) | |
download | mariadb-git-07ed8294fa83e1c5acd3ecc4691667690e578581.tar.gz |
added check connection mgmapi method
added ndb_mgm_check_connection when error is printed
ndb/include/mgmapi/mgmapi.h:
added check connection mgmapi method
ndb/src/mgmapi/mgmapi.cpp:
added check connection mgmapi method
ndb/src/mgmclient/CommandInterpreter.cpp:
added mgm_check_check_connection when error is printed
ndb/src/mgmsrv/Services.cpp:
added check connection mgmapi method
ndb/src/mgmsrv/Services.hpp:
added check connection mgmapi method
Diffstat (limited to 'ndb/src/mgmclient/CommandInterpreter.cpp')
-rw-r--r-- | ndb/src/mgmclient/CommandInterpreter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ndb/src/mgmclient/CommandInterpreter.cpp b/ndb/src/mgmclient/CommandInterpreter.cpp index ce8bafc36c5..f36dddf815d 100644 --- a/ndb/src/mgmclient/CommandInterpreter.cpp +++ b/ndb/src/mgmclient/CommandInterpreter.cpp @@ -429,6 +429,8 @@ emptyString(const char* s) void CommandInterpreter::printError() { + if (ndb_mgm_check_connection(m_mgmsrv)) + connected= false; ndbout_c("* %5d: %s", ndb_mgm_get_latest_error(m_mgmsrv), ndb_mgm_get_latest_error_msg(m_mgmsrv)); @@ -1030,9 +1032,6 @@ CommandInterpreter::executeShow(char* parameters) { int i; if (emptyString(parameters)) { - ndbout << "Cluster Configuration" << endl - << "---------------------" << endl; - ndb_mgm_cluster_state *state = ndb_mgm_get_status(m_mgmsrv); if(state == NULL) { ndbout_c("Could not get status"); @@ -1092,6 +1091,8 @@ CommandInterpreter::executeShow(char* parameters) } } + ndbout << "Cluster Configuration" << endl + << "---------------------" << endl; print_nodes(state, it, "ndbd", ndb_nodes, NDB_MGM_NODE_TYPE_NDB, master_id); print_nodes(state, it, "ndb_mgmd", mgm_nodes, NDB_MGM_NODE_TYPE_MGM, 0); print_nodes(state, it, "mysqld", api_nodes, NDB_MGM_NODE_TYPE_API, 0); |