diff options
author | unknown <gni/root@dev3-221.dev.cn.tlan> | 2006-12-06 12:01:19 +0800 |
---|---|---|
committer | unknown <gni/root@dev3-221.dev.cn.tlan> | 2006-12-06 12:01:19 +0800 |
commit | 6ff0409d889e0c179ef9322dd49ee353276a73ce (patch) | |
tree | 66f2455f2f806104f811c903e4aa0242894d240e /ndb | |
parent | 98575bb401270c3100d0e7a3c5826209d4f97323 (diff) | |
download | mariadb-git-6ff0409d889e0c179ef9322dd49ee353276a73ce.tar.gz |
BUG#21715 mgm client command <id|all> STATUS returns "not connected" for non-data nodes
ndb/src/mgmclient/CommandInterpreter.cpp:
Adding the judgement for node type to distinguish the data nodes and non-data nodes.
From the return value. Management client can't distinguish the really not connected status for data nodes and status of non-data nodes.
We can get the connect status about non-data nodes from version, if the version is 0, it means no connected status.
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/src/mgmclient/CommandInterpreter.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ndb/src/mgmclient/CommandInterpreter.cpp b/ndb/src/mgmclient/CommandInterpreter.cpp index 65d5b038707..ea5dc218898 100644 --- a/ndb/src/mgmclient/CommandInterpreter.cpp +++ b/ndb/src/mgmclient/CommandInterpreter.cpp @@ -1627,6 +1627,18 @@ CommandInterpreter::executeStatus(int processId, ndbout << processId << ": Node not found" << endl; return -1; } + if (cl->node_states[i].node_type != NDB_MGM_NODE_TYPE_NDB){ + if (cl->node_states[i].version != 0){ + ndbout << "Node "<< cl->node_states[i].node_id <<": connected" ; + ndbout_c(" (Version %d.%d.%d)", + getMajor(version) , + getMinor(version), + getBuild(version)); + + }else + ndbout << "Node "<< cl->node_states[i].node_id <<": not connected" << endl; + return 0; + } status = cl->node_states[i].node_status; startPhase = cl->node_states[i].start_phase; version = cl->node_states[i].version; |