Merge lp:~akopytov/percona-xtrabackup/bug1256942-2.1 into lp:percona-xtrabackup/2.1

Proposed by Alexey Kopytov
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 715
Proposed branch: lp:~akopytov/percona-xtrabackup/bug1256942-2.1
Merge into: lp:percona-xtrabackup/2.1
Diff against target: 110 lines (+35/-22)
2 files modified
innobackupex.pl (+11/-0)
test/t/version_check.sh (+24/-22)
To merge this branch: bzr merge lp:~akopytov/percona-xtrabackup/bug1256942-2.1
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+200789@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
=== modified file 'innobackupex.pl'
--- innobackupex.pl 2014-01-03 10:46:10 +0000
+++ innobackupex.pl 2014-01-08 09:52:36 +0000
@@ -965,6 +965,10 @@
965 "$home",965 "$home",
966 );966 );
967967
968 if ($ENV{PTDEBUG_VERSION_CHECK_HOME}) {
969 @vc_dirs = ( $ENV{PTDEBUG_VERSION_CHECK_HOME} );
970 }
971
968 sub version_check_file {972 sub version_check_file {
969 foreach my $dir ( @vc_dirs ) {973 foreach my $dir ( @vc_dirs ) {
970 if ( -d $dir && -w $dir ) {974 if ( -d $dir && -w $dir ) {
@@ -1564,6 +1568,10 @@
1564 $now = current_time();1568 $now = current_time();
1565 print STDERR1569 print STDERR
1566 "$now $prefix Executing a version check against the server...\n";1570 "$now $prefix Executing a version check against the server...\n";
1571
1572 # Redirect STDOUT to STDERR, as VersionCheck prints alerts to STDOUT
1573 select STDERR;
1574
1567 VersionCheck::version_check(1575 VersionCheck::version_check(
1568 force => 1,1576 force => 1,
1569 instances => [ {1577 instances => [ {
@@ -1572,6 +1580,9 @@
1572 }1580 }
1573 ]1581 ]
1574 );1582 );
1583 # Restore STDOUT as the default filehandle
1584 select STDOUT;
1585
1575 $now = current_time();1586 $now = current_time();
1576 print STDERR "$now $prefix Done.\n";1587 print STDERR "$now $prefix Done.\n";
1577 }1588 }
15781589
=== modified file 'test/t/version_check.sh'
--- test/t/version_check.sh 2013-11-07 12:23:43 +0000
+++ test/t/version_check.sh 2014-01-08 09:52:36 +0000
@@ -7,22 +7,14 @@
77
8start_server8start_server
99
10# VersionCheck looks for a directory where percona-version-check file is created10# Override the directory where percona-version-check is created to make the test
11# in the following order:11# stable
12#12
13# my @vc_dirs = (13export PTDEBUG_VERSION_CHECK_HOME=$topdir
14# '/etc/percona',14
15# '/etc/percona-toolkit',15vc_file=$PTDEBUG_VERSION_CHECK_HOME/percona-version-check
16# '/tmp',16
17# "$home",17[ ! -f $vc_file ] || die "$vc_file exists!"
18# );
19#
20# Assume that both /etc/percona and /etc/percona-toolkit either do not exist or
21# are not writable. So we'll be testing /tmp/percona-version-check. There's a
22# potential race if there are concurrent tests or other tools using VC, but
23# there's currently no way to avoid that.
24
25rm -f /tmp/percona-version-check
2618
27# VersionCheck is enabled by default, but the test suite adds --no-version-check19# VersionCheck is enabled by default, but the test suite adds --no-version-check
28# to IB_ARGS so we don't execute it for all tests.20# to IB_ARGS so we don't execute it for all tests.
@@ -30,23 +22,33 @@
3022
31innobackupex --no-timestamp $topdir/backup123innobackupex --no-timestamp $topdir/backup1
3224
33if [ -f /tmp/percona-version-check ]25if [ -f $vc_file ]
34then26then
35 die "/tmp/percona-version-check has been created with --no-version-check!"27 die "$vc_file has been created with --no-version-check!"
36fi28fi
3729
38IB_ARGS=`echo $IB_ARGS | sed -e 's/--no-version-check//g'`30IB_ARGS=`echo $IB_ARGS | sed -e 's/--no-version-check//g'`
3931
40innobackupex --no-timestamp $topdir/backup232innobackupex --no-timestamp $topdir/backup2
4133
42if [ ! -f /tmp/percona-version-check ]34if [ ! -f $vc_file ]
43then35then
44 die "/tmp/percona-version-check has not been created!"36 die "$vc_file has not been created!"
45fi37fi
4638
47rm -f /tmp/percona-version-check
48
49if ! grep -q "Executing a version check" $OUTFILE39if ! grep -q "Executing a version check" $OUTFILE
50then40then
51 die "Version check has not been performed."41 die "Version check has not been performed."
52fi42fi
43
44################################################################################
45# Bug #1256942: xbstream stream mode issues a warning on standard output messing
46# up the backup stream
47################################################################################
48
49mkdir $topdir/backup3
50
51rm -f $vc_file
52
53innobackupex --no-timestamp --stream=tar $topdir/backup3 | \
54 $TAR -C $topdir/backup3 -xivf -

Subscribers

People subscribed via source and target branches

to all changes: