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
=== modified file 'innobackupex'
--- innobackupex 2012-12-17 03:36:27 +0000
+++ innobackupex 2012-12-27 16:04:30 +0000
@@ -1621,7 +1621,12 @@
1621 } elsif ($option_copy_back || $option_move_back) {1621 } elsif ($option_copy_back || $option_move_back) {
1622 #$backup_config_file = $backup_dir . '/backup-my.cnf';1622 #$backup_config_file = $backup_dir . '/backup-my.cnf';
1623 #read_config_file($backup_config_file, \%backup_config);1623 #read_config_file($backup_config_file, \%backup_config);
1624 } 1624 }
1625
1626 if ( -e "$suspend_file" ) {
1627 print STDERR "WARNING : A left over instance of suspend file '$suspend_file' was found.\n";
1628 unlink $suspend_file || Die "Failed to delete '$suspend_file': $!";
1629 }
1625}1630}
16261631
16271632
16281633
=== added file 'test/t/bug1007446.sh'
--- test/t/bug1007446.sh 1970-01-01 00:00:00 +0000
+++ test/t/bug1007446.sh 2012-12-27 16:04:30 +0000
@@ -0,0 +1,14 @@
1############################################################################
2# Bug #1007446: innobackupex should remove stale xtrabackup_suspended file
3############################################################################
4
5. inc/common.sh
6
7start_server
8
9echo "" > $MYSQLD_TMPDIR/xtrabackup_suspended
10
11mkdir -p $topdir/backup
12innobackupex --stream=tar $topdir/backup > /dev/null
13
14grep -q "A left over instance of suspend file" $OUTFILE

Subscribers

People subscribed via source and target branches