Merge lp:~gl-az/percona-xtrabackup/2.1-bug1007446 into lp:percona-xtrabackup/2.1

Proposed by George Ormond Lorch III
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 467
Proposed branch: lp:~gl-az/percona-xtrabackup/2.1-bug1007446
Merge into: lp:percona-xtrabackup/2.1
Diff against target: 36 lines (+20/-1)
2 files modified
innobackupex (+6/-1)
test/t/bug1007446.sh (+14/-0)
To merge this branch: bzr merge lp:~gl-az/percona-xtrabackup/2.1-bug1007446
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+141368@code.launchpad.net

Description of the change

Fixed https://bugs.launchpad.net/percona-xtrabackup/+bug/1007446
innobackupex should remove stale xtrabackup_suspended file on start

In innobackupex init, added test for existance of suspend file, then report and attempt to remove if the file exists.

Created new test case bug1007466.sh that creates a fake suspend file before launching innobackupex and tests for warning in output file.

To post a comment you must log in.
Revision history for this message
George Ormond Lorch III (gl-az) wrote :
Revision history for this message
Alexey Kopytov (akopytov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'innobackupex'
2--- innobackupex 2012-12-17 03:36:27 +0000
3+++ innobackupex 2012-12-27 16:04:30 +0000
4@@ -1621,7 +1621,12 @@
5 } elsif ($option_copy_back || $option_move_back) {
6 #$backup_config_file = $backup_dir . '/backup-my.cnf';
7 #read_config_file($backup_config_file, \%backup_config);
8- }
9+ }
10+
11+ if ( -e "$suspend_file" ) {
12+ print STDERR "WARNING : A left over instance of suspend file '$suspend_file' was found.\n";
13+ unlink $suspend_file || Die "Failed to delete '$suspend_file': $!";
14+ }
15 }
16
17
18
19=== added file 'test/t/bug1007446.sh'
20--- test/t/bug1007446.sh 1970-01-01 00:00:00 +0000
21+++ test/t/bug1007446.sh 2012-12-27 16:04:30 +0000
22@@ -0,0 +1,14 @@
23+############################################################################
24+# Bug #1007446: innobackupex should remove stale xtrabackup_suspended file
25+############################################################################
26+
27+. inc/common.sh
28+
29+start_server
30+
31+echo "" > $MYSQLD_TMPDIR/xtrabackup_suspended
32+
33+mkdir -p $topdir/backup
34+innobackupex --stream=tar $topdir/backup > /dev/null
35+
36+grep -q "A left over instance of suspend file" $OUTFILE

Subscribers

People subscribed via source and target branches