summaryrefslogtreecommitdiff
path: root/ndb/src/mgmsrv/MgmtSrvr.cpp
diff options
context:
space:
mode:
authorstewart@mysql.com <>2006-05-23 16:24:26 +1000
committerstewart@mysql.com <>2006-05-23 16:24:26 +1000
commitf474e69d9c794b1519034b844b30f4ededcbb19f (patch)
treefb529e6f054c489046e283da45eeb92a8b2344cd /ndb/src/mgmsrv/MgmtSrvr.cpp
parent53cd54118792af3f1bb96981810bc7405b3d077d (diff)
downloadmariadb-git-f474e69d9c794b1519034b844b30f4ededcbb19f.tar.gz
BUG#18966 Change in stop/shutdown behaviour
Improvements that were discussed with Tomas. Maintain protocol backwards/forwards compatibilty for client and server and support the commands from ndb_mgm 'as expected'
Diffstat (limited to 'ndb/src/mgmsrv/MgmtSrvr.cpp')
-rw-r--r--ndb/src/mgmsrv/MgmtSrvr.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/ndb/src/mgmsrv/MgmtSrvr.cpp b/ndb/src/mgmsrv/MgmtSrvr.cpp
index 4c3631488e6..8a9a33779d8 100644
--- a/ndb/src/mgmsrv/MgmtSrvr.cpp
+++ b/ndb/src/mgmsrv/MgmtSrvr.cpp
@@ -1196,6 +1196,27 @@ int MgmtSrvr::stopNodes(const Vector<NodeId> &node_ids,
return ret;
}
+int MgmtSrvr::shutdownMGM(int *stopCount, bool abort, int *stopSelf)
+{
+ NodeId nodeId = 0;
+ int error;
+
+ while(getNextNodeId(&nodeId, NDB_MGM_NODE_TYPE_MGM))
+ {
+ if(nodeId==getOwnNodeId())
+ continue;
+ error= sendStopMgmd(nodeId, abort, true, false,
+ false, false);
+ if (error == 0)
+ *stopCount++;
+ }
+
+ *stopSelf= 1;
+ *stopCount++;
+
+ return 0;
+}
+
/*
* Perform DB nodes shutdown.
* MGM servers are left in their current state