Merge lp:~percona-dev/percona-xtrabackup/bug_737462 into lp:percona-xtrabackup/2.0

Proposed by Valentine Gostev on 2011-04-28
Status: Merged
Approved by: Alexey Kopytov on 2011-04-28
Approved revision: 250
Merged at revision: 250
Proposed branch: lp:~percona-dev/percona-xtrabackup/bug_737462
Merge into: lp:percona-xtrabackup/2.0
Diff against target: 14 lines (+3/-1)
1 file modified
innobackupex (+3/-1)
To merge this branch: bzr merge lp:~percona-dev/percona-xtrabackup/bug_737462
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) 2011-04-28 Approve on 2011-04-28
Review via email: mp+59314@code.launchpad.net

This proposal supersedes a proposal from 2011-04-27.

Description of the change

Added fix for bug 737462

To post a comment you must log in.
Alexey Kopytov (akopytov) wrote : Posted in a previous version of this proposal

Valentine,

1. $option_ibbackup_binary is initialized to 'autodetect', so the condition (!$option_ibbackup_binary) will never be true. You should use "if( $option_ibbackup_binary eq 'autodetect' ) " instead.

2. Alignment and closing brace placement is wrong.

3. I think it makes more sense to default to 'xtrabackup' rather than 'xtrabackup_51'. Then, in the windows case, for example, you don't even need to specify the binary explicitly.

I think it's easier to show the patch:

--- innobackupex 2011-04-14 17:59:27 +0000
+++ innobackupex 2011-04-27 08:24:18 +0000
@@ -215,7 +215,9 @@ print_version();

 # initialize global variables and perform some checks
 if ($option_copy_back) {
- $option_ibbackup_binary = 'xtrabackup_51';
+ if ( $option_ibbackup_binary eq 'autodetect' ) {
+ $option_ibbackup_binary = 'xtrabackup';
+ }
 } elsif ($option_apply_log) {
  # Read XtraBackup version from backup dir
  if (-e "$backup_dir/$xtrabackup_binary_file") {

review: Needs Fixing
Alexey Kopytov (akopytov) wrote : Posted in a previous version of this proposal

Please indent the assignment appropriately to make it nested in the if statement.

review: Needs Fixing
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 2011-04-14 17:59:27 +0000
3+++ innobackupex 2011-04-28 04:13:27 +0000
4@@ -215,7 +215,9 @@
5
6 # initialize global variables and perform some checks
7 if ($option_copy_back) {
8- $option_ibbackup_binary = 'xtrabackup_51';
9+ if ( $option_ibbackup_binary eq 'autodetect' ) {
10+ $option_ibbackup_binary = 'xtrabackup';
11+ }
12 } elsif ($option_apply_log) {
13 # Read XtraBackup version from backup dir
14 if (-e "$backup_dir/$xtrabackup_binary_file") {

Subscribers

People subscribed via source and target branches