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
e7d89abf
Commit
e7d89abf
authored
Aug 09, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Forgott to update testBackuo w.r.t to ConfigRetreiver
parent
e3ed90a1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
15 deletions
+22
-15
ndb/test/src/NdbBackup.cpp
ndb/test/src/NdbBackup.cpp
+16
-9
ndb/test/src/NdbRestarter.cpp
ndb/test/src/NdbRestarter.cpp
+6
-6
No files found.
ndb/test/src/NdbBackup.cpp
View file @
e7d89abf
...
@@ -69,11 +69,17 @@ NdbBackup::getFileSystemPathForNode(int _node_id){
...
@@ -69,11 +69,17 @@ NdbBackup::getFileSystemPathForNode(int _node_id){
/**
/**
* Fetch configuration from management server
* Fetch configuration from management server
*/
*/
ConfigRetriever
cr
;
ConfigRetriever
cr
(
0
,
NODE_TYPE_API
);
ndb_mgm_configuration
*
p
;
ndb_mgm_configuration
*
p
=
cr
.
getConfig
(
host
.
c_str
(),
port
,
0
,
NODE_TYPE_API
);
BaseString
tmp
;
tmp
.
assfmt
(
"%s:%d"
,
host
.
c_str
(),
port
);
if
(
p
==
0
){
NdbMgmHandle
handle
=
ndb_mgm_create_handle
();
const
char
*
s
=
cr
.
getErrorString
();
if
(
handle
==
0
||
ndb_mgm_connect
(
handle
,
tmp
.
c_str
())
!=
0
&&
(
p
=
ndb_mgm_get_configuration
(
handle
,
0
))
==
0
){
const
char
*
s
=
0
;
if
(
p
==
0
&&
handle
!=
0
){
s
=
ndb_mgm_get_latest_error_msg
(
handle
);
if
(
s
==
0
)
if
(
s
==
0
)
s
=
"No error given!"
;
s
=
"No error given!"
;
...
@@ -81,6 +87,7 @@ NdbBackup::getFileSystemPathForNode(int _node_id){
...
@@ -81,6 +87,7 @@ NdbBackup::getFileSystemPathForNode(int _node_id){
ndbout
<<
s
<<
endl
;
ndbout
<<
s
<<
endl
;
return
NULL
;
return
NULL
;
}
}
}
/**
/**
* Setup cluster configuration data
* Setup cluster configuration data
...
...
ndb/test/src/NdbRestarter.cpp
View file @
e7d89abf
...
@@ -46,21 +46,21 @@ NdbRestarter::NdbRestarter(const char* _addr):
...
@@ -46,21 +46,21 @@ NdbRestarter::NdbRestarter(const char* _addr):
return
;
return
;
}
}
if
(
lcfg
.
i
tems
==
0
){
if
(
lcfg
.
i
ds
.
size
()
==
0
){
g_err
<<
"NdbRestarter - No management servers configured in local config file"
<<
endl
;
g_err
<<
"NdbRestarter - No management servers configured in local config file"
<<
endl
;
return
;
return
;
}
}
for
(
int
i
=
0
;
i
<
lcfg
.
i
tems
;
i
++
){
for
(
int
i
=
0
;
i
<
lcfg
.
i
ds
.
size
()
;
i
++
){
MgmtSrvrId
*
m
=
lcfg
.
ids
[
i
];
MgmtSrvrId
*
m
=
&
lcfg
.
ids
[
i
];
switch
(
m
->
type
){
switch
(
m
->
type
){
case
MgmId_TCP
:
case
MgmId_TCP
:
char
buf
[
255
];
char
buf
[
255
];
snprintf
(
buf
,
255
,
"%s:%d"
,
m
->
data
.
tcp
.
remoteHost
,
m
->
data
.
tcp
.
port
);
snprintf
(
buf
,
255
,
"%s:%d"
,
m
->
name
.
c_str
(),
m
->
port
);
addr
.
assign
(
buf
);
addr
.
assign
(
buf
);
host
.
assign
(
m
->
data
.
tcp
.
remoteHost
);
host
.
assign
(
m
->
name
.
c_str
()
);
port
=
m
->
data
.
tcp
.
port
;
port
=
m
->
port
;
return
;
return
;
break
;
break
;
case
MgmId_File
:
case
MgmId_File
:
...
...
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