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
60204e8a
Commit
60204e8a
authored
Jan 12, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge build.mysql.com:/users/tulin/mysql-4.1
into build.mysql.com:/users/tulin/mysql-5.0
parents
fb78b349
08770d33
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
3 deletions
+26
-3
ndb/src/mgmsrv/ConfigInfo.cpp
ndb/src/mgmsrv/ConfigInfo.cpp
+26
-3
No files found.
ndb/src/mgmsrv/ConfigInfo.cpp
View file @
60204e8a
...
...
@@ -98,6 +98,7 @@ static bool fixDepricated(InitConfigFileParser::Context & ctx, const char *);
static
bool
saveInConfigValues
(
InitConfigFileParser
::
Context
&
ctx
,
const
char
*
);
static
bool
fixFileSystemPath
(
InitConfigFileParser
::
Context
&
ctx
,
const
char
*
data
);
static
bool
fixBackupDataDir
(
InitConfigFileParser
::
Context
&
ctx
,
const
char
*
data
);
static
bool
fixShmUniqueId
(
InitConfigFileParser
::
Context
&
ctx
,
const
char
*
data
);
const
ConfigInfo
::
SectionRule
ConfigInfo
::
m_SectionRules
[]
=
{
...
...
@@ -111,6 +112,8 @@ ConfigInfo::m_SectionRules[] = {
{
"REP"
,
transformNode
,
0
},
{
"EXTERNAL REP"
,
transformExtNode
,
0
},
{
MGM_TOKEN
,
fixShmUniqueId
,
0
},
{
"TCP"
,
checkConnectionSupport
,
0
},
{
"SHM"
,
checkConnectionSupport
,
0
},
{
"SCI"
,
checkConnectionSupport
,
0
},
...
...
@@ -3155,19 +3158,39 @@ fixPortNumber(InitConfigFileParser::Context & ctx, const char * data){
DBUG_RETURN
(
true
);
}
static
bool
fixShmUniqueId
(
InitConfigFileParser
::
Context
&
ctx
,
const
char
*
data
)
{
DBUG_ENTER
(
"fixShmUniqueId"
);
Uint32
nodes
=
0
;
ctx
.
m_userProperties
.
get
(
ctx
.
fname
,
&
nodes
);
if
(
nodes
==
1
)
// first management server
{
Uint32
portno
=
atoi
(
NDB_PORT
);
ctx
.
m_currentSection
->
get
(
"PortNumber"
,
&
portno
);
ctx
.
m_userProperties
.
put
(
"ShmUniqueId"
,
portno
);
}
DBUG_RETURN
(
true
);
}
static
bool
fixShmKey
(
InitConfigFileParser
::
Context
&
ctx
,
const
char
*
)
{
DBUG_ENTER
(
"fixShmKey"
);
Uint32
id1
=
0
,
id2
=
0
,
key
=
0
;
require
(
ctx
.
m_currentSection
->
get
(
"NodeId1"
,
&
id1
));
require
(
ctx
.
m_currentSection
->
get
(
"NodeId2"
,
&
id2
));
if
(
ctx
.
m_currentSection
->
get
(
"ShmKey"
,
&
key
))
return
true
;
{
DBUG_RETURN
(
true
);
}
key
=
(
id1
>
id2
?
id1
<<
16
|
id2
:
id2
<<
16
|
id1
);
require
(
ctx
.
m_userProperties
.
get
(
"ShmUniqueId"
,
&
key
));
key
=
key
<<
16
|
(
id1
>
id2
?
id1
<<
8
|
id2
:
id2
<<
8
|
id1
);
ctx
.
m_currentSection
->
put
(
"ShmKey"
,
key
);
return
true
;
DBUG_PRINT
(
"info"
,(
"Added ShmKey=0x%x"
,
key
));
DBUG_RETURN
(
true
);
}
/**
...
...
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