Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
a86100e7
Commit
a86100e7
authored
Sep 17, 2004
by
tomas@poseidon.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corrected mistake in counting
parent
87ba45e9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
ndb/src/mgmsrv/MgmtSrvr.cpp
ndb/src/mgmsrv/MgmtSrvr.cpp
+14
-13
No files found.
ndb/src/mgmsrv/MgmtSrvr.cpp
View file @
a86100e7
...
@@ -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
(
"Updat
e
ing 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
(
"Updat
e
ing 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
(
"Updat
e
ing 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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment