Commit a86100e7 authored by tomas@poseidon.(none)'s avatar tomas@poseidon.(none)

corrected mistake in counting

parent 87ba45e9
...@@ -2193,16 +2193,17 @@ MgmtSrvr::alloc_node_id(NodeId * nodeId, ...@@ -2193,16 +2193,17 @@ MgmtSrvr::alloc_node_id(NodeId * nodeId,
Guard g(&f_node_id_mutex); Guard g(&f_node_id_mutex);
int no_mgm= 0; int no_mgm= 0;
NodeBitmask connected_nodes(m_reserved_nodes); NodeBitmask connected_nodes(m_reserved_nodes);
if (theFacade && theFacade->theClusterMgr) {
for(Uint32 i = 0; i < MAX_NODES; i++) for(Uint32 i = 0; i < MAX_NODES; i++)
if (getNodeType(i) == NDB_MGM_NODE_TYPE_NDB) { {
if (getNodeType(i) == NDB_MGM_NODE_TYPE_NDB &&
theFacade && theFacade->theClusterMgr) {
const ClusterMgr::Node &node= theFacade->theClusterMgr->getNodeInfo(i); const ClusterMgr::Node &node= theFacade->theClusterMgr->getNodeInfo(i);
if (node.connected) if (node.connected) {
connected_nodes.bitOR(node.m_state.m_connected_nodes); connected_nodes.bitOR(node.m_state.m_connected_nodes);
}
} else if (getNodeType(i) == NDB_MGM_NODE_TYPE_MGM) } else if (getNodeType(i) == NDB_MGM_NODE_TYPE_MGM)
no_mgm++; no_mgm++;
} }
bool found_matching_id= false; bool found_matching_id= false;
bool found_matching_type= false; bool found_matching_type= false;
bool found_free_node= false; bool found_free_node= false;
...@@ -2274,7 +2275,7 @@ MgmtSrvr::alloc_node_id(NodeId * nodeId, ...@@ -2274,7 +2275,7 @@ MgmtSrvr::alloc_node_id(NodeId * nodeId,
if (config_hostname == 0) { if (config_hostname == 0) {
error_string.appfmt("Ambiguity for node id %d.\n" error_string.appfmt("Ambiguity for node id %d.\n"
"Suggest specifying node id in connectstring,\n" "Suggest specifying node id in connectstring,\n"
"or specifying unique host names in config file,\n", "or specifying unique host names in config file,\n"
"or specifying just one mgmt server in config file.", "or specifying just one mgmt server in config file.",
tmp); tmp);
DBUG_RETURN(false); DBUG_RETURN(false);
...@@ -2795,15 +2796,15 @@ MgmtSrvr::setDbParameter(int node, int param, const char * value, ...@@ -2795,15 +2796,15 @@ MgmtSrvr::setDbParameter(int node, int param, const char * value,
switch(p_type){ switch(p_type){
case 0: case 0:
res = i2.set(param, val_32); res = i2.set(param, val_32);
ndbout_c("Updateing node %d param: %d to %d", node, param, val_32); ndbout_c("Updating node %d param: %d to %d", node, param, val_32);
break; break;
case 1: case 1:
res = i2.set(param, val_64); res = i2.set(param, val_64);
ndbout_c("Updateing node %d param: %d to %Ld", node, param, val_32); ndbout_c("Updating node %d param: %d to %Ld", node, param, val_32);
break; break;
case 2: case 2:
res = i2.set(param, val_char); res = i2.set(param, val_char);
ndbout_c("Updateing node %d param: %d to %s", node, param, val_char); ndbout_c("Updating node %d param: %d to %s", node, param, val_char);
break; break;
default: default:
abort(); abort();
......
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