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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
c501710a
Commit
c501710a
authored
Aug 24, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/jonas/src/mysql-4.1
parents
5df7c936
e92c08ab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
3 deletions
+58
-3
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+58
-3
No files found.
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
View file @
c501710a
...
...
@@ -1401,6 +1401,7 @@ void Dbdih::ndbStartReqLab(Signal* signal, BlockReference ref)
void
Dbdih
::
execREAD_NODESCONF
(
Signal
*
signal
)
{
unsigned
i
;
ReadNodesConf
*
const
readNodes
=
(
ReadNodesConf
*
)
&
signal
->
theData
[
0
];
jamEntry
();
Uint32
nodeArray
[
MAX_NDB_NODES
];
...
...
@@ -1408,9 +1409,10 @@ void Dbdih::execREAD_NODESCONF(Signal* signal)
csystemnodes
=
readNodes
->
noOfNodes
;
cmasterNodeId
=
readNodes
->
masterNodeId
;
int
index
=
0
;
for
(
unsigned
i
=
1
;
i
<
MAX_NDB_NODES
;
i
++
){
NdbNodeBitmask
tmp
;
tmp
.
assign
(
2
,
readNodes
->
allNodes
);
for
(
i
=
1
;
i
<
MAX_NDB_NODES
;
i
++
){
jam
();
if
(
NodeBitmask
::
get
(
readNodes
->
allNodes
,
i
)){
if
(
tmp
.
get
(
i
)){
jam
();
nodeArray
[
index
]
=
i
;
if
(
NodeBitmask
::
get
(
readNodes
->
inactiveNodes
,
i
)
==
false
){
...
...
@@ -1420,6 +1422,32 @@ void Dbdih::execREAD_NODESCONF(Signal* signal)
index
++
;
}
//if
}
//for
if
(
cstarttype
==
NodeState
::
ST_SYSTEM_RESTART
||
cstarttype
==
NodeState
::
ST_NODE_RESTART
){
for
(
i
=
1
;
i
<
MAX_NDB_NODES
;
i
++
){
const
Uint32
stat
=
Sysfile
::
getNodeStatus
(
i
,
SYSFILE
->
nodeStatus
);
if
(
stat
==
Sysfile
::
NS_NotDefined
&&
!
tmp
.
get
(
i
)){
jam
();
continue
;
}
if
(
tmp
.
get
(
i
)
&&
stat
!=
Sysfile
::
NS_NotDefined
){
jam
();
continue
;
}
char
buf
[
255
];
snprintf
(
buf
,
sizeof
(
buf
),
"Illegal configuration change."
" Initial start needs to be performed "
" when changing no of storage nodes (node %d)"
,
i
);
progError
(
__LINE__
,
ERR_INVALID_CONFIG
,
buf
);
}
}
ndbrequire
(
csystemnodes
>=
1
&&
csystemnodes
<
MAX_NDB_NODES
);
if
(
cstarttype
==
NodeState
::
ST_INITIAL_START
)
{
jam
();
...
...
@@ -3451,10 +3479,37 @@ void Dbdih::selectMasterCandidateAndSend(Signal* signal)
}
//if
}
//for
ndbrequire
(
masterCandidateId
!=
0
);
setNodeGroups
();
signal
->
theData
[
0
]
=
masterCandidateId
;
signal
->
theData
[
1
]
=
gci
;
sendSignal
(
cntrlblockref
,
GSN_DIH_RESTARTCONF
,
signal
,
2
,
JBB
);
setNodeGroups
();
Uint32
node_groups
[
MAX_NDB_NODES
];
memset
(
node_groups
,
0
,
sizeof
(
node_groups
));
for
(
nodePtr
.
i
=
1
;
nodePtr
.
i
<
MAX_NDB_NODES
;
nodePtr
.
i
++
)
{
jam
();
const
Uint32
ng
=
Sysfile
::
getNodeGroup
(
nodePtr
.
i
,
SYSFILE
->
nodeGroups
);
if
(
ng
!=
NO_NODE_GROUP_ID
){
ndbrequire
(
ng
<
MAX_NDB_NODES
);
node_groups
[
ng
]
++
;
}
}
for
(
nodePtr
.
i
=
0
;
nodePtr
.
i
<
MAX_NDB_NODES
;
nodePtr
.
i
++
)
{
jam
();
Uint32
count
=
node_groups
[
nodePtr
.
i
];
if
(
count
!=
0
&&
count
!=
cnoReplicas
){
char
buf
[
255
];
snprintf
(
buf
,
sizeof
(
buf
),
"Illegal configuration change."
" Initial start needs to be performed "
" when changing no of replicas (%d != %d)"
,
node_groups
[
nodePtr
.
i
],
cnoReplicas
);
progError
(
__LINE__
,
ERR_INVALID_CONFIG
,
buf
);
}
}
}
//Dbdih::selectMasterCandidate()
/* ------------------------------------------------------------------------- */
...
...
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