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
0f8dc706
Commit
0f8dc706
authored
Aug 24, 2004
by
tomas@poseidon.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb config ability/naming changes, see respective file
parent
a2bcb2a5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
44 deletions
+50
-44
mysql-test/ndb/ndb_config_2_node.ini
mysql-test/ndb/ndb_config_2_node.ini
+26
-26
ndb/src/common/mgmcommon/ConfigInfo.cpp
ndb/src/common/mgmcommon/ConfigInfo.cpp
+5
-3
ndb/src/common/mgmcommon/InitConfigFileParser.cpp
ndb/src/common/mgmcommon/InitConfigFileParser.cpp
+13
-9
ndb/src/mgmclient/CommandInterpreter.cpp
ndb/src/mgmclient/CommandInterpreter.cpp
+6
-6
No files found.
mysql-test/ndb/ndb_config_2_node.ini
View file @
0f8dc706
[
DB DEFAULT
]
NoOfReplicas
:
2
MaxNoOfConcurrentOperations
:
CHOOSE_MaxNoOfConcurrentOperations
DataMemory
:
CHOOSE_DataMemory
IndexMemory
:
CHOOSE_IndexMemory
Diskless
:
CHOOSE_Diskless
TimeBetweenWatchDogCheck
:
30000
FileSystemPath
:
CHOOSE_FILESYSTEM
[
ndbd default
]
NoOfReplicas
=
2
MaxNoOfConcurrentOperations
=
CHOOSE_MaxNoOfConcurrentOperations
DataMemory
=
CHOOSE_DataMemory
IndexMemory
=
CHOOSE_IndexMemory
Diskless
=
CHOOSE_Diskless
TimeBetweenWatchDogCheck
=
30000
FileSystemPath
=
CHOOSE_FILESYSTEM
[
COMPUTER
]
Id
:
1
HostName
:
CHOOSE_HOSTNAME_1
[
computer
]
Id
=
1
HostName
=
CHOOSE_HOSTNAME_1
[
COMPUTER
]
Id
:
2
HostName
:
CHOOSE_HOSTNAME_2
[
computer
]
Id
=
2
HostName
=
CHOOSE_HOSTNAME_2
[
DB
]
ExecuteOnComputer
:
1
[
ndbd
]
ExecuteOnComputer
=
1
[
DB
]
ExecuteOnComputer
:
2
[
ndbd
]
ExecuteOnComputer
=
2
[
MGM
]
PortNumber
:
CHOOSE_PORT_MGM
[
ndb_mgmd
]
PortNumber
=
CHOOSE_PORT_MGM
[
MYSQLD
]
[
mysqld
]
[
MYSQLD
]
[
mysqld
]
[
MYSQLD
]
[
mysqld
]
[
MYSQLD
]
[
mysqld
]
[
TCP DEFAULT
]
PortNumber
:
CHOOSE_PORT_TRANSPORTER
[
tcp default
]
PortNumber
=
CHOOSE_PORT_TRANSPORTER
ndb/src/common/mgmcommon/ConfigInfo.cpp
View file @
0f8dc706
...
...
@@ -1989,7 +1989,8 @@ const Properties *
ConfigInfo
::
getInfo
(
const
char
*
section
)
const
{
const
Properties
*
p
;
if
(
!
m_info
.
get
(
section
,
&
p
)){
warning
(
"getInfo"
,
section
);
return
0
;
// warning("getInfo", section);
}
return
p
;
}
...
...
@@ -1998,7 +1999,8 @@ const Properties *
ConfigInfo
::
getDefaults
(
const
char
*
section
)
const
{
const
Properties
*
p
;
if
(
!
m_systemDefaults
.
get
(
section
,
&
p
)){
warning
(
"getDefaults"
,
section
);
return
0
;
//warning("getDefaults", section);
}
return
p
;
}
...
...
@@ -2072,7 +2074,7 @@ ConfigInfo::isSection(const char * section) const {
const
char
*
ConfigInfo
::
getAlias
(
const
char
*
section
)
const
{
for
(
int
i
=
0
;
m_sectionNameAliases
[
i
].
name
!=
0
;
i
++
)
if
(
!
strcmp
(
section
,
m_sectionNameAliases
[
i
].
alias
))
if
(
!
strc
asec
mp
(
section
,
m_sectionNameAliases
[
i
].
alias
))
return
m_sectionNameAliases
[
i
].
name
;
return
0
;
}
...
...
ndb/src/common/mgmcommon/InitConfigFileParser.cpp
View file @
0f8dc706
...
...
@@ -117,8 +117,8 @@ InitConfigFileParser::parseConfig(FILE * file) {
ctx
.
m_sectionLineno
=
ctx
.
m_lineno
;
ctx
.
m_currentSection
=
new
Properties
(
true
);
ctx
.
m_userDefaults
=
NULL
;
ctx
.
m_currentInfo
=
m_info
->
getInfo
(
ctx
.
fname
);
ctx
.
m_systemDefaults
=
m_info
->
getDefaults
(
ctx
.
fname
);
require
((
ctx
.
m_currentInfo
=
m_info
->
getInfo
(
ctx
.
fname
))
!=
0
);
require
((
ctx
.
m_systemDefaults
=
m_info
->
getDefaults
(
ctx
.
fname
))
!=
0
);
continue
;
}
...
...
@@ -139,8 +139,8 @@ InitConfigFileParser::parseConfig(FILE * file) {
ctx
.
m_sectionLineno
=
ctx
.
m_lineno
;
ctx
.
m_currentSection
=
new
Properties
(
true
);
ctx
.
m_userDefaults
=
getSection
(
ctx
.
fname
,
ctx
.
m_defaults
);
ctx
.
m_currentInfo
=
m_info
->
getInfo
(
ctx
.
fname
);
ctx
.
m_systemDefaults
=
m_info
->
getDefaults
(
ctx
.
fname
);
require
((
ctx
.
m_currentInfo
=
m_info
->
getInfo
(
ctx
.
fname
))
!=
0
);
require
((
ctx
.
m_systemDefaults
=
m_info
->
getDefaults
(
ctx
.
fname
))
!=
0
);
continue
;
}
...
...
@@ -180,8 +180,8 @@ InitConfigFileParser::parseConfig(FILE * file) {
ctx
.
type
=
InitConfigFileParser
::
Section
;
ctx
.
m_currentSection
=
tmp
[
j
].
m_sectionData
;
ctx
.
m_userDefaults
=
getSection
(
ctx
.
fname
,
ctx
.
m_defaults
);
ctx
.
m_currentInfo
=
m_info
->
getInfo
(
ctx
.
fname
);
ctx
.
m_systemDefaults
=
m_info
->
getDefaults
(
ctx
.
fname
);
require
((
ctx
.
m_currentInfo
=
m_info
->
getInfo
(
ctx
.
fname
))
!=
0
);
require
((
ctx
.
m_systemDefaults
=
m_info
->
getDefaults
(
ctx
.
fname
))
!=
0
);
if
(
!
storeSection
(
ctx
))
return
0
;
}
...
...
@@ -516,7 +516,7 @@ char*
InitConfigFileParser
::
parseDefaultSectionHeader
(
const
char
*
line
)
const
{
static
char
token1
[
MAX_LINE_LENGTH
],
token2
[
MAX_LINE_LENGTH
];
int
no
=
sscanf
(
line
,
"[%120[A-Z
a-z] %120[A-Z
a-z]]"
,
token1
,
token2
);
int
no
=
sscanf
(
line
,
"[%120[A-Z
_a-z] %120[A-Z_
a-z]]"
,
token1
,
token2
);
// Not correct no of tokens
if
(
no
!=
2
)
return
NULL
;
...
...
@@ -524,8 +524,12 @@ InitConfigFileParser::parseDefaultSectionHeader(const char* line) const {
// Not correct keyword at end
if
(
!
strcasecmp
(
token2
,
"DEFAULT"
)
==
0
)
return
NULL
;
if
(
m_info
->
getInfo
(
token1
)){
return
strdup
(
token1
);
const
char
*
token1_alias
=
m_info
->
getAlias
(
token1
);
if
(
token1_alias
==
0
)
token1_alias
=
token1
;
if
(
m_info
->
getInfo
(
token1_alias
)){
return
strdup
(
token1_alias
);
}
// Did not find section
...
...
ndb/src/mgmclient/CommandInterpreter.cpp
View file @
0f8dc706
...
...
@@ -682,12 +682,12 @@ CommandInterpreter::executeShow(char* parameters)
}
ndbout
<<
ndb_nodes
<<
"
NDB N
ode(s)"
<<
"
[ndbd] n
ode(s)"
<<
endl
;
for
(
i
=
0
;
i
<
state
->
no_of_nodes
;
i
++
)
{
if
(
state
->
node_states
[
i
].
node_type
==
NDB_MGM_NODE_TYPE_NDB
)
{
ndbout
<<
"
DB node:
\t
"
<<
state
->
node_states
[
i
].
node_id
;
ndbout
<<
"
[ndbd]
\t\t
id=
"
<<
state
->
node_states
[
i
].
node_id
;
if
(
state
->
node_states
[
i
].
version
!=
0
)
{
ndbout
<<
" (Version: "
<<
getMajor
(
state
->
node_states
[
i
].
version
)
<<
"."
...
...
@@ -707,12 +707,12 @@ CommandInterpreter::executeShow(char* parameters)
ndbout
<<
endl
;
ndbout
<<
mgm_nodes
<<
"
MGM N
ode(s)"
<<
"
[ndb_mgmd] n
ode(s)"
<<
endl
;
for
(
i
=
0
;
i
<
state
->
no_of_nodes
;
i
++
)
{
if
(
state
->
node_states
[
i
].
node_type
==
NDB_MGM_NODE_TYPE_MGM
)
{
ndbout
<<
"
MGM node:
\t
"
<<
state
->
node_states
[
i
].
node_id
;
ndbout
<<
"
[ndb_mgmd]
\t
id=
"
<<
state
->
node_states
[
i
].
node_id
;
if
(
state
->
node_states
[
i
].
version
!=
0
)
{
ndbout
<<
" (Version: "
<<
getMajor
(
state
->
node_states
[
i
].
version
)
<<
"."
...
...
@@ -728,12 +728,12 @@ CommandInterpreter::executeShow(char* parameters)
ndbout
<<
endl
;
ndbout
<<
api_nodes
<<
"
API N
ode(s)"
<<
"
[mysqld] n
ode(s)"
<<
endl
;
for
(
i
=
0
;
i
<
state
->
no_of_nodes
;
i
++
)
{
if
(
state
->
node_states
[
i
].
node_type
==
NDB_MGM_NODE_TYPE_API
)
{
ndbout
<<
"
API node:
\t
"
<<
state
->
node_states
[
i
].
node_id
;
ndbout
<<
"
[mysqld]
\t
id=
"
<<
state
->
node_states
[
i
].
node_id
;
if
(
state
->
node_states
[
i
].
version
!=
0
)
{
ndbout
<<
" (Version: "
<<
getMajor
(
state
->
node_states
[
i
].
version
)
<<
"."
...
...
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