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
6847a748
Commit
6847a748
authored
Apr 26, 2007
by
lzhou/zhl@dev3-63.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge lzhou@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb-bj
into dev3-63.(none):/home/zhl/mysql/mysql-5.1/bug27207
parents
98d37e1d
fcec5410
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
4 deletions
+29
-4
storage/ndb/src/mgmsrv/ConfigInfo.cpp
storage/ndb/src/mgmsrv/ConfigInfo.cpp
+29
-4
No files found.
storage/ndb/src/mgmsrv/ConfigInfo.cpp
View file @
6847a748
...
...
@@ -2889,25 +2889,50 @@ static bool fixNodeId(InitConfigFileParser::Context & ctx, const char * data)
char
buf
[]
=
"NodeIdX"
;
buf
[
6
]
=
data
[
sizeof
(
"NodeI"
)];
char
sysbuf
[]
=
"SystemX"
;
sysbuf
[
6
]
=
data
[
sizeof
(
"NodeI"
)];
const
char
*
nodeId
;
require
(
ctx
.
m_currentSection
->
get
(
buf
,
&
nodeId
));
if
(
!
ctx
.
m_currentSection
->
get
(
buf
,
&
nodeId
))
{
ctx
.
reportError
(
"Mandatory parameter %s missing from section"
"[%s] starting at line: %d"
,
buf
,
ctx
.
fname
,
ctx
.
m_sectionLineno
);
return
false
;
}
char
tmpLine
[
MAX_LINE_LENGTH
];
strncpy
(
tmpLine
,
nodeId
,
MAX_LINE_LENGTH
);
char
*
token1
=
strtok
(
tmpLine
,
"."
);
char
*
token2
=
strtok
(
NULL
,
"."
);
Uint32
id
;
if
(
!
token1
)
{
ctx
.
reportError
(
"Value for mandatory parameter %s missing from section "
"[%s] starting at line: %d"
,
buf
,
ctx
.
fname
,
ctx
.
m_sectionLineno
);
return
false
;
}
if
(
token2
==
NULL
)
{
// Only a number given
errno
=
0
;
char
*
p
;
id
=
strtol
(
token1
,
&
p
,
10
);
if
(
errno
!=
0
)
warning
(
"STRTOK1"
,
nodeId
);
if
(
errno
!=
0
||
id
<=
0x0
||
id
>
MAX_NODES
)
{
ctx
.
reportError
(
"Illegal value for mandatory parameter %s from section "
"[%s] starting at line: %d"
,
buf
,
ctx
.
fname
,
ctx
.
m_sectionLineno
);
return
false
;
}
require
(
ctx
.
m_currentSection
->
put
(
buf
,
id
,
true
));
}
else
{
// A pair given (e.g. "uppsala.32")
errno
=
0
;
char
*
p
;
id
=
strtol
(
token2
,
&
p
,
10
);
if
(
errno
!=
0
)
warning
(
"STRTOK2"
,
nodeId
);
if
(
errno
!=
0
||
id
<=
0x0
||
id
>
MAX_NODES
)
{
ctx
.
reportError
(
"Illegal value for mandatory parameter %s from section "
"[%s] starting at line: %d"
,
buf
,
ctx
.
fname
,
ctx
.
m_sectionLineno
);
return
false
;
}
require
(
ctx
.
m_currentSection
->
put
(
buf
,
id
,
true
));
require
(
ctx
.
m_currentSection
->
put
(
sysbuf
,
token1
));
}
...
...
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