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
d6c7a717
Commit
d6c7a717
authored
Aug 24, 2004
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.5066
parents
3b4d7e0c
b06742ec
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
3 deletions
+60
-3
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+58
-3
sql-common/my_time.c
sql-common/my_time.c
+2
-0
No files found.
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
View file @
d6c7a717
...
...
@@ -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()
/* ------------------------------------------------------------------------- */
...
...
sql-common/my_time.c
View file @
d6c7a717
...
...
@@ -17,6 +17,8 @@
#include <my_time.h>
#include <m_string.h>
#include <m_ctype.h>
/* Windows version of localtime_r() is declared in my_ptrhead.h */
#include <my_pthread.h>
ulonglong
log_10_int
[
20
]
=
{
...
...
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