Merge lp:~akopytov/percona-xtrabackup/bug1181092-bug1181099-2.0 into lp:percona-xtrabackup/2.0

Proposed by Alexey Kopytov
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 577
Proposed branch: lp:~akopytov/percona-xtrabackup/bug1181092-bug1181099-2.0
Merge into: lp:percona-xtrabackup/2.0
Diff against target: 56 lines (+34/-5)
2 files modified
innobackupex (+2/-5)
test/t/server_version.sh (+32/-0)
To merge this branch: bzr merge lp:~akopytov/percona-xtrabackup/bug1181092-bug1181099-2.0
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+178886@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote :

The corresponding change has already been merged to 2.1, but the 2.0 MP got lost somehow.

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 2013-05-03 10:40:03 +0000
3+++ innobackupex 2013-08-07 05:44:27 +0000
4@@ -2886,13 +2886,10 @@
5 if($var_version =~ m/5\.0\.\d/){
6 $ibbackup_binary = ($win eq 1 ? 'xtrabackup.exe' : 'xtrabackup_51');
7 }
8-if($var_version =~ m/5\.1\.\d/ and $var_innodb_version =~ m/.*/){
9+if($var_version =~ m/5\.1\.\d/ and !$var_innodb_version){
10 $ibbackup_binary = ($win eq 1 ? 'xtrabackup.exe' : 'xtrabackup_51');
11 }
12-if($var_version =~ m/5\.1\.\d/ and $var_innodb_version =~ m/1\.0\.\d+$/){
13- $ibbackup_binary = ($win eq 1 ? 'xtrabackup.exe' : 'xtrabackup');
14-}
15-if($var_version =~ m/5\.1\.\d/ and $var_innodb_version =~ m/1\.0\.\d+-(rel)?\d/){
16+if($var_version =~ m/5\.1\.\d/ and $var_innodb_version){
17 $ibbackup_binary = ($win eq 1 ? 'xtrabackup.exe' : 'xtrabackup');
18 }
19 if($var_version =~ m/5\.2\.\d/){
20
21=== added file 'test/t/server_version.sh'
22--- test/t/server_version.sh 1970-01-01 00:00:00 +0000
23+++ test/t/server_version.sh 2013-08-07 05:44:27 +0000
24@@ -0,0 +1,32 @@
25+#########################################################################
26+# Test server version auto-detection
27+#########################################################################
28+
29+. inc/common.sh
30+
31+start_server
32+
33+# Remove the explicit --ibbackup option from IB_ARGS
34+IB_ARGS="--defaults-file=$MYSQLD_VARDIR/my.cnf"
35+
36+backup_dir=$topdir/backup
37+innobackupex --no-timestamp $backup_dir
38+vlog "Backup created in directory $backup_dir"
39+
40+stop_server
41+# Remove datadir
42+rm -r $mysql_datadir
43+# Restore sakila
44+vlog "Applying log"
45+vlog "###########"
46+vlog "# PREPARE #"
47+vlog "###########"
48+innobackupex --apply-log $backup_dir
49+vlog "Restoring MySQL datadir"
50+mkdir -p $mysql_datadir
51+vlog "###########"
52+vlog "# RESTORE #"
53+vlog "###########"
54+innobackupex --copy-back $backup_dir
55+
56+start_server

Subscribers

People subscribed via source and target branches