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
ed9453de
Commit
ed9453de
authored
Sep 20, 2004
by
joreland@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug#4590
Use ndb_mgm_listen_event to wait for backup messages
parent
2e7e0d1f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
2 deletions
+35
-2
ndb/src/mgmclient/CommandInterpreter.cpp
ndb/src/mgmclient/CommandInterpreter.cpp
+34
-2
ndb/src/mgmsrv/Services.cpp
ndb/src/mgmsrv/Services.cpp
+1
-0
No files found.
ndb/src/mgmclient/CommandInterpreter.cpp
View file @
ed9453de
...
...
@@ -1672,13 +1672,45 @@ CommandInterpreter::executeStartBackup(char* /*parameters*/)
connect
();
struct
ndb_mgm_reply
reply
;
unsigned
int
backupId
;
int
filter
[]
=
{
15
,
NDB_MGM_EVENT_CATEGORY_BACKUP
,
0
};
int
fd
=
ndb_mgm_listen_event
(
m_mgmsrv
,
filter
);
int
result
=
ndb_mgm_start_backup
(
m_mgmsrv
,
&
backupId
,
&
reply
);
if
(
result
!=
0
)
{
ndbout
<<
"Start of backup failed"
<<
endl
;
printError
();
}
else
{
ndbout
<<
"Backup started. Backup id "
<<
backupId
<<
"."
<<
endl
;
close
(
fd
);
return
;
}
char
*
tmp
;
char
buf
[
1024
];
{
SocketInputStream
in
(
fd
);
int
count
=
0
;
do
{
tmp
=
in
.
gets
(
buf
,
1024
);
if
(
tmp
)
{
ndbout
<<
tmp
;
int
id
;
if
(
sscanf
(
tmp
,
"%*[^:]: Backup %d "
,
&
id
)
==
1
&&
id
==
backupId
){
count
++
;
}
}
}
while
(
count
<
2
);
}
SocketInputStream
in
(
fd
,
10
);
do
{
tmp
=
in
.
gets
(
buf
,
1024
);
if
(
tmp
&&
tmp
[
0
]
!=
0
)
{
ndbout
<<
tmp
;
}
}
while
(
tmp
&&
tmp
[
0
]
!=
0
);
close
(
fd
);
}
void
...
...
ndb/src/mgmsrv/Services.cpp
View file @
ed9453de
...
...
@@ -1411,6 +1411,7 @@ done:
m_output
->
println
(
"result: %d"
,
result
);
if
(
result
!=
0
)
m_output
->
println
(
"msg: %s"
,
msg
.
c_str
());
m_output
->
println
(
""
);
}
template
class
MutexVector
<
int
>;
...
...
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