Merge lp:~akopytov/percona-xtrabackup/bug1322658-2.2 into lp:percona-xtrabackup/2.2

Proposed by Alexey Kopytov
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 4987
Proposed branch: lp:~akopytov/percona-xtrabackup/bug1322658-2.2
Merge into: lp:percona-xtrabackup/2.2
Diff against target: 49 lines (+13/-1)
2 files modified
storage/innobase/xtrabackup/innobackupex.pl (+11/-0)
storage/innobase/xtrabackup/test/t/remote_tablespaces.sh (+2/-1)
To merge this branch: bzr merge lp:~akopytov/percona-xtrabackup/bug1322658-2.2
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+227684@code.launchpad.net
To post a comment you must log in.
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 'storage/innobase/xtrabackup/innobackupex.pl'
2--- storage/innobase/xtrabackup/innobackupex.pl 2014-06-10 13:53:29 +0000
3+++ storage/innobase/xtrabackup/innobackupex.pl 2014-07-22 08:59:28 +0000
4@@ -19,6 +19,7 @@
5 use File::Temp;
6 use File::Find;
7 use File::Copy;
8+use File::Path;
9 use English qw(-no_match_vars);
10 use Time::HiRes qw(usleep);
11
12@@ -2233,6 +2234,16 @@
13 file_to_array($isl_path, \@lines);
14 $dst_path = $lines[0];
15 print STDERR "Using $dst_path as the destination path\n";
16+
17+ my $dst_dir = File::Basename::dirname($dst_path);
18+ if (! -d $dst_dir) {
19+ print STDERR "Recursively creating directory $dst_dir\n";
20+
21+ eval { mkpath($dst_dir) };
22+ if ($@) {
23+ die "Could not create directory $dst_dir: $@";
24+ }
25+ }
26 }
27 }
28
29
30=== modified file 'storage/innobase/xtrabackup/test/t/remote_tablespaces.sh'
31--- storage/innobase/xtrabackup/test/t/remote_tablespaces.sh 2013-07-25 15:04:49 +0000
32+++ storage/innobase/xtrabackup/test/t/remote_tablespaces.sh 2014-07-22 08:59:28 +0000
33@@ -8,7 +8,7 @@
34
35 start_server --innodb_file_per_table
36
37-remote_dir=$TEST_VAR_ROOT/var1/remote_dir
38+remote_dir=$TEST_VAR_ROOT/var1/remote_dir/subdir
39
40 $MYSQL $MYSQL_ARGS test <<EOF
41 CREATE TABLE t(id INT AUTO_INCREMENT PRIMARY KEY, c INT)
42@@ -31,6 +31,7 @@
43 stop_server
44
45 rm -rf $mysql_datadir/*
46+rm -rf $remote_dir
47
48 innobackupex --apply-log $topdir/backup
49 innobackupex --copy-back $topdir/backup

Subscribers

People subscribed via source and target branches

to all changes: