Commit fe9d004c authored by unknown's avatar unknown

ndb - some hugo updates

  make dump state args list const
  make node lists const


storage/ndb/include/mgmapi/mgmapi_debug.h:
  make dump state args list const
storage/ndb/src/mgmapi/mgmapi.cpp:
  make dump state args list const
storage/ndb/test/include/NdbRestarter.hpp:
  make node lists const
storage/ndb/test/src/NdbRestarter.cpp:
  make node lists const
parent 0c7025da
...@@ -101,7 +101,7 @@ extern "C" { ...@@ -101,7 +101,7 @@ extern "C" {
*/ */
int ndb_mgm_dump_state(NdbMgmHandle handle, int ndb_mgm_dump_state(NdbMgmHandle handle,
int nodeId, int nodeId,
int * args, const int * args,
int num_args, int num_args,
struct ndb_mgm_reply* reply); struct ndb_mgm_reply* reply);
......
...@@ -1442,7 +1442,7 @@ ndb_mgm_listen_event(NdbMgmHandle handle, const int filter[]) ...@@ -1442,7 +1442,7 @@ ndb_mgm_listen_event(NdbMgmHandle handle, const int filter[])
extern "C" extern "C"
int int
ndb_mgm_dump_state(NdbMgmHandle handle, int nodeId, int* _args, ndb_mgm_dump_state(NdbMgmHandle handle, int nodeId, const int * _args,
int _num_args, struct ndb_mgm_reply* /* reply */) int _num_args, struct ndb_mgm_reply* /* reply */)
{ {
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_dump_state"); SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_dump_state");
......
...@@ -38,16 +38,16 @@ public: ...@@ -38,16 +38,16 @@ public:
bool abort = false); bool abort = false);
int startAll(); int startAll();
int startNodes(int * _nodes, int _num_nodes); int startNodes(const int * _nodes, int _num_nodes);
int waitClusterStarted(unsigned int _timeout = 120); int waitClusterStarted(unsigned int _timeout = 120);
int waitClusterSingleUser(unsigned int _timeout = 120); int waitClusterSingleUser(unsigned int _timeout = 120);
int waitClusterStartPhase(int _startphase, unsigned int _timeout = 120); int waitClusterStartPhase(int _startphase, unsigned int _timeout = 120);
int waitClusterNoStart(unsigned int _timeout = 120); int waitClusterNoStart(unsigned int _timeout = 120);
int waitNodesStarted(int * _nodes, int _num_nodes, int waitNodesStarted(const int * _nodes, int _num_nodes,
unsigned int _timeout = 120); unsigned int _timeout = 120);
int waitNodesStartPhase(int * _nodes, int _num_nodes, int waitNodesStartPhase(const int * _nodes, int _num_nodes,
int _startphase, unsigned int _timeout = 120); int _startphase, unsigned int _timeout = 120);
int waitNodesNoStart(int * _nodes, int _num_nodes, int waitNodesNoStart(const int * _nodes, int _num_nodes,
unsigned int _timeout = 120); unsigned int _timeout = 120);
...@@ -58,8 +58,8 @@ public: ...@@ -58,8 +58,8 @@ public:
int enterSingleUserMode(int _nodeId); int enterSingleUserMode(int _nodeId);
int exitSingleUserMode(); int exitSingleUserMode();
int dumpStateOneNode(int _nodeId, int * _args, int _num_args); int dumpStateOneNode(int _nodeId, const int * _args, int _num_args);
int dumpStateAllNodes(int * _args, int _num_args); int dumpStateAllNodes(const int * _args, int _num_args);
int getMasterNodeId(); int getMasterNodeId();
int getRandomNodeSameNodeGroup(int nodeId, int randomNumber); int getRandomNodeSameNodeGroup(int nodeId, int randomNumber);
...@@ -74,7 +74,7 @@ protected: ...@@ -74,7 +74,7 @@ protected:
unsigned int _timeout, unsigned int _timeout,
int _startphase = -1); int _startphase = -1);
int waitNodesState(int * _nodes, int _num_nodes, int waitNodesState(const int * _nodes, int _num_nodes,
ndb_mgm_node_status _status, ndb_mgm_node_status _status,
unsigned int _timeout, unsigned int _timeout,
int _startphase = -1); int _startphase = -1);
......
...@@ -249,7 +249,7 @@ NdbRestarter::waitClusterState(ndb_mgm_node_status _status, ...@@ -249,7 +249,7 @@ NdbRestarter::waitClusterState(ndb_mgm_node_status _status,
int int
NdbRestarter::waitNodesState(int * _nodes, int _num_nodes, NdbRestarter::waitNodesState(const int * _nodes, int _num_nodes,
ndb_mgm_node_status _status, ndb_mgm_node_status _status,
unsigned int _timeout, unsigned int _timeout,
int _startphase){ int _startphase){
...@@ -367,20 +367,20 @@ NdbRestarter::waitNodesState(int * _nodes, int _num_nodes, ...@@ -367,20 +367,20 @@ NdbRestarter::waitNodesState(int * _nodes, int _num_nodes,
return 0; return 0;
} }
int NdbRestarter::waitNodesStarted(int * _nodes, int _num_nodes, int NdbRestarter::waitNodesStarted(const int * _nodes, int _num_nodes,
unsigned int _timeout){ unsigned int _timeout){
return waitNodesState(_nodes, _num_nodes, return waitNodesState(_nodes, _num_nodes,
NDB_MGM_NODE_STATUS_STARTED, _timeout); NDB_MGM_NODE_STATUS_STARTED, _timeout);
} }
int NdbRestarter::waitNodesStartPhase(int * _nodes, int _num_nodes, int NdbRestarter::waitNodesStartPhase(const int * _nodes, int _num_nodes,
int _startphase, unsigned int _timeout){ int _startphase, unsigned int _timeout){
return waitNodesState(_nodes, _num_nodes, return waitNodesState(_nodes, _num_nodes,
NDB_MGM_NODE_STATUS_STARTING, _timeout, NDB_MGM_NODE_STATUS_STARTING, _timeout,
_startphase); _startphase);
} }
int NdbRestarter::waitNodesNoStart(int * _nodes, int _num_nodes, int NdbRestarter::waitNodesNoStart(const int * _nodes, int _num_nodes,
unsigned int _timeout){ unsigned int _timeout){
return waitNodesState(_nodes, _num_nodes, return waitNodesState(_nodes, _num_nodes,
NDB_MGM_NODE_STATUS_NOT_STARTED, _timeout); NDB_MGM_NODE_STATUS_NOT_STARTED, _timeout);
...@@ -549,7 +549,7 @@ int NdbRestarter::startAll(){ ...@@ -549,7 +549,7 @@ int NdbRestarter::startAll(){
} }
int NdbRestarter::startNodes(int * nodes, int num_nodes){ int NdbRestarter::startNodes(const int * nodes, int num_nodes){
if (!isConnected()) if (!isConnected())
return -1; return -1;
...@@ -599,7 +599,7 @@ int NdbRestarter::insertErrorInAllNodes(int _error){ ...@@ -599,7 +599,7 @@ int NdbRestarter::insertErrorInAllNodes(int _error){
int NdbRestarter::dumpStateOneNode(int _nodeId, int * _args, int _num_args){ int NdbRestarter::dumpStateOneNode(int _nodeId, const int * _args, int _num_args){
if (!isConnected()) if (!isConnected())
return -1; return -1;
...@@ -617,7 +617,7 @@ int NdbRestarter::dumpStateOneNode(int _nodeId, int * _args, int _num_args){ ...@@ -617,7 +617,7 @@ int NdbRestarter::dumpStateOneNode(int _nodeId, int * _args, int _num_args){
return reply.return_code; return reply.return_code;
} }
int NdbRestarter::dumpStateAllNodes(int * _args, int _num_args){ int NdbRestarter::dumpStateAllNodes(const int * _args, int _num_args){
if (!isConnected()) if (!isConnected())
return -1; return -1;
......
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