Commit 4a7a2a67 authored by unknown's avatar unknown

Merge dev3-127.(none):/mnt/mysql/home/ngb/mysql-5.0/mysql-5.0-ndb-bj

into  dev3-127.(none):/mnt/mysql/home/ngb/mysql-5.0/bug20575


ndb/src/mgmclient/CommandInterpreter.cpp:
  Auto merged
parents d1eddd01 2f715e9f
...@@ -2273,7 +2273,33 @@ Ndbcntr::StopRecord::checkNodeFail(Signal* signal){ ...@@ -2273,7 +2273,33 @@ Ndbcntr::StopRecord::checkNodeFail(Signal* signal){
{ {
NdbNodeBitmask tmp; NdbNodeBitmask tmp;
tmp.assign(NdbNodeBitmask::Size, stopReq.nodes); tmp.assign(NdbNodeBitmask::Size, stopReq.nodes);
NdbNodeBitmask ndbStopNodes;
ndbStopNodes.assign(NdbNodeBitmask::Size, stopReq.nodes);
ndbStopNodes.bitAND(ndbMask);
ndbStopNodes.copyto(NdbNodeBitmask::Size, stopReq.nodes);
ndbMask.bitANDC(tmp); ndbMask.bitANDC(tmp);
bool allNodesStopped = true;
int i ;
for( i = 0; i< NdbNodeBitmask::Size; i++ ){
if ( stopReq.nodes[i] != 0 ){
allNodesStopped = false;
break;
}
}
if ( allNodesStopped ) {
StopConf * const stopConf = (StopConf *)&signal->theData[0];
stopConf->senderData = stopReq.senderData;
stopConf->nodeState = (Uint32) NodeState::SL_NOTHING;
cntr.sendSignal(stopReq.senderRef, GSN_STOP_CONF, signal,
StopConf::SignalLength, JBB);
stopReq.senderRef = 0;
return false;
}
} }
else else
{ {
......
...@@ -1102,7 +1102,7 @@ CommandInterpreter::execute_impl(const char *_line, bool interactive) ...@@ -1102,7 +1102,7 @@ CommandInterpreter::execute_impl(const char *_line, bool interactive)
int node_id; int node_id;
if (convert(command_list[pos].c_str(), node_id)) if (convert(command_list[pos].c_str(), node_id))
{ {
if (node_id <= 0) { if (node_id <= 0 || node_id > MAX_NODES) {
ndbout << "Invalid node ID: " << command_list[pos].c_str() ndbout << "Invalid node ID: " << command_list[pos].c_str()
<< "." << endl; << "." << endl;
DBUG_RETURN(true); DBUG_RETURN(true);
......
...@@ -1014,6 +1014,11 @@ int MgmtSrvr::sendSTOP_REQ(const Vector<NodeId> &node_ids, ...@@ -1014,6 +1014,11 @@ int MgmtSrvr::sendSTOP_REQ(const Vector<NodeId> &node_ids,
{ {
nodeId= node_ids[i]; nodeId= node_ids[i];
ndbout << "asked to stop " << nodeId << endl; ndbout << "asked to stop " << nodeId << endl;
if ((getNodeType(nodeId) != NDB_MGM_NODE_TYPE_MGM)
&&(getNodeType(nodeId) != NDB_MGM_NODE_TYPE_NDB))
return WRONG_PROCESS_TYPE;
if (getNodeType(nodeId) != NDB_MGM_NODE_TYPE_MGM) if (getNodeType(nodeId) != NDB_MGM_NODE_TYPE_MGM)
nodes_to_stop.set(nodeId); nodes_to_stop.set(nodeId);
else if (nodeId != getOwnNodeId()) else if (nodeId != getOwnNodeId())
......
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