summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ndb/src/mgmapi/mgmapi.cpp3
-rw-r--r--ndb/tools/waiter.cpp6
2 files changed, 9 insertions, 0 deletions
diff --git a/ndb/src/mgmapi/mgmapi.cpp b/ndb/src/mgmapi/mgmapi.cpp
index f99478a8cea..061360428af 100644
--- a/ndb/src/mgmapi/mgmapi.cpp
+++ b/ndb/src/mgmapi/mgmapi.cpp
@@ -695,10 +695,12 @@ ndb_mgm_get_status(NdbMgmHandle handle)
Vector<BaseString> split;
tmp.split(split, ":");
if(split.size() != 2){
+ SET_ERROR(handle, NDB_MGM_ILLEGAL_NODE_STATUS, buf);
return NULL;
}
if(!(split[0].trim() == "nodes")){
+ SET_ERROR(handle, NDB_MGM_ILLEGAL_NODE_STATUS, buf);
return NULL;
}
@@ -746,6 +748,7 @@ ndb_mgm_get_status(NdbMgmHandle handle)
if(i+1 != noOfNodes){
free(state);
+ SET_ERROR(handle, NDB_MGM_ILLEGAL_NODE_STATUS, "Node count mismatch");
return NULL;
}
diff --git a/ndb/tools/waiter.cpp b/ndb/tools/waiter.cpp
index db90bd8bd90..cb02d5e7c36 100644
--- a/ndb/tools/waiter.cpp
+++ b/ndb/tools/waiter.cpp
@@ -124,6 +124,12 @@ getStatus(){
ndbout << "status==NULL, retries="<<retries<<endl;
MGMERR(handle);
retries++;
+ ndb_mgm_disconnect(handle);
+ if (ndb_mgm_connect(handle,0,0,1)) {
+ MGMERR(handle);
+ g_err << "Reconnect failed" << endl;
+ break;
+ }
continue;
}
int count = status->no_of_nodes;