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
00915656
Commit
00915656
authored
Dec 06, 2004
by
stewart@mysql.com[stewart]
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add (optional) endian parameter to 'get nodeid' to warn on endian conflicts.
parent
dededf09
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
ndb/src/mgmapi/mgmapi.cpp
ndb/src/mgmapi/mgmapi.cpp
+4
-0
ndb/src/mgmsrv/Services.cpp
ndb/src/mgmsrv/Services.cpp
+14
-1
No files found.
BitKeeper/etc/logging_ok
View file @
00915656
...
...
@@ -192,6 +192,7 @@ serg@sergbook.mylan
serg@sergbook.mysql.com
sergefp@mysql.com
sinisa@rhols221.adsl.netsonic.fi
stewart@mysql.com
tfr@beta.frontier86.ee
tfr@indrek.tfr.cafe.ee
tfr@sarvik.tfr.cafe.ee
...
...
ndb/src/mgmapi/mgmapi.cpp
View file @
00915656
...
...
@@ -1690,6 +1690,9 @@ ndb_mgm_alloc_nodeid(NdbMgmHandle handle, unsigned int version, int nodetype)
{
CHECK_HANDLE
(
handle
,
0
);
CHECK_CONNECTED
(
handle
,
0
);
union
{
long
l
;
char
c
[
sizeof
(
long
)];
}
endian_check
;
endian_check
.
l
=
1
;
int
nodeid
=
handle
->
cfg
.
_ownNodeId
;
...
...
@@ -1700,6 +1703,7 @@ ndb_mgm_alloc_nodeid(NdbMgmHandle handle, unsigned int version, int nodetype)
args
.
put
(
"user"
,
"mysqld"
);
args
.
put
(
"password"
,
"mysqld"
);
args
.
put
(
"public key"
,
"a public key"
);
args
.
put
(
"endian"
,
(
endian_check
.
c
[
sizeof
(
long
)
-
1
])
?
"big"
:
"little"
);
const
ParserRow
<
ParserDummy
>
reply
[]
=
{
MGM_CMD
(
"get nodeid reply"
,
NULL
,
""
),
...
...
ndb/src/mgmsrv/Services.cpp
View file @
00915656
...
...
@@ -132,6 +132,7 @@ ParserRow<MgmApiSession> commands[] = {
MGM_ARG
(
"user"
,
String
,
Mandatory
,
"Password"
),
MGM_ARG
(
"password"
,
String
,
Mandatory
,
"Password"
),
MGM_ARG
(
"public key"
,
String
,
Mandatory
,
"Public key"
),
MGM_ARG
(
"endian"
,
String
,
Optional
,
"Endianness"
),
MGM_CMD
(
"get version"
,
&
MgmApiSession
::
getVersion
,
""
),
...
...
@@ -386,6 +387,8 @@ MgmApiSession::get_nodeid(Parser_t::Context &,
const
char
*
user
;
const
char
*
password
;
const
char
*
public_key
;
const
char
*
endian
;
union
{
long
l
;
char
c
[
sizeof
(
long
)];
}
endian_check
;
args
.
get
(
"version"
,
&
version
);
args
.
get
(
"nodetype"
,
&
nodetype
);
...
...
@@ -394,7 +397,17 @@ MgmApiSession::get_nodeid(Parser_t::Context &,
args
.
get
(
"user"
,
&
user
);
args
.
get
(
"password"
,
&
password
);
args
.
get
(
"public key"
,
&
public_key
);
args
.
get
(
"endian"
,
&
endian
);
endian_check
.
l
=
1
;
if
(
endian
&&
strcmp
(
endian
,(
endian_check
.
c
[
sizeof
(
long
)
-
1
])
?
"big"
:
"little"
)
!=
0
)
{
m_output
->
println
(
cmd
);
m_output
->
println
(
"result: Endianness of nodes does not match."
);
m_output
->
println
(
""
);
return
;
}
bool
compatible
;
switch
(
nodetype
)
{
case
NODE_TYPE_MGM
:
...
...
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