Merge lp:~akopytov/percona-xtrabackup/bug972169_bug999750 into lp:percona-xtrabackup/2.0

Proposed by Alexey Kopytov
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: no longer in the source branch.
Merged at revision: 427
Proposed branch: lp:~akopytov/percona-xtrabackup/bug972169_bug999750
Merge into: lp:percona-xtrabackup/2.0
Diff against target: 92 lines (+54/-10)
4 files modified
src/xtrabackup.c (+16/-0)
test/t/bug972169.sh (+14/-0)
test/t/bug999750.sh (+21/-0)
test/t/ib_stream_incremental.sh (+3/-10)
To merge this branch: bzr merge lp:~akopytov/percona-xtrabackup/bug972169_bug999750
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+105887@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote :
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/xtrabackup.c'
2--- src/xtrabackup.c 2012-04-02 02:25:07 +0000
3+++ src/xtrabackup.c 2012-05-15 19:47:20 +0000
4@@ -6564,6 +6564,22 @@
5 exit(EXIT_FAILURE);
6 }
7
8+ if (xtrabackup_incremental && xtrabackup_stream &&
9+ xtrabackup_stream_fmt == XB_STREAM_FMT_TAR) {
10+ msg("xtrabackup: error: "
11+ "streaming incremental backups are incompatible with the \n"
12+ "'tar' streaming format. Use --stream=xbstream instead.\n");
13+ exit(EXIT_FAILURE);
14+ }
15+
16+ if (xtrabackup_compress && xtrabackup_stream &&
17+ xtrabackup_stream_fmt == XB_STREAM_FMT_TAR) {
18+ msg("xtrabackup: error: "
19+ "compressed backups are incompatible with the \n"
20+ "'tar' streaming format. Use --stream=xbstream instead.\n");
21+ exit(EXIT_FAILURE);
22+ }
23+
24 /* cannot execute both for now */
25 {
26 int num = 0;
27
28=== added file 'test/t/bug972169.sh'
29--- test/t/bug972169.sh 1970-01-01 00:00:00 +0000
30+++ test/t/bug972169.sh 2012-05-15 19:47:20 +0000
31@@ -0,0 +1,14 @@
32+############################################################################
33+# Bug #972169: --compress in 2.0 should be incompatible with --stream=tar
34+############################################################################
35+
36+. inc/common.sh
37+
38+init
39+
40+run_mysqld
41+
42+run_cmd_expect_failure $XB_BIN $XB_ARGS --datadir=$mysql_datadir --backup \
43+ --compress --stream=tar
44+grep -q "xtrabackup: error: compressed backups are incompatible with the" \
45+ $OUTFILE
46
47=== added file 'test/t/bug999750.sh'
48--- test/t/bug999750.sh 1970-01-01 00:00:00 +0000
49+++ test/t/bug999750.sh 2012-05-15 19:47:20 +0000
50@@ -0,0 +1,21 @@
51+############################################################################
52+# Bug #999750: incremental backups should be incompatible with --stream=tar
53+############################################################################
54+
55+. inc/common.sh
56+
57+init
58+
59+# Exclude the built-in InnoDB configuration as it requires a different format
60+# for --incremental-lsn.
61+if [ -z "$INNODB_VERSION" ]; then
62+ echo "Requires InnoDB plugin or XtraDB" >$SKIPPED_REASON
63+ exit $SKIPPED_EXIT_CODE
64+fi
65+
66+run_mysqld
67+
68+run_cmd_expect_failure $XB_BIN $XB_ARGS --datadir=$mysql_datadir --backup \
69+ --incremental-lsn=0 --stream=tar
70+grep -q "xtrabackup: error: streaming incremental backups are incompatible with the " \
71+ $OUTFILE
72
73=== modified file 'test/t/ib_stream_incremental.sh'
74--- test/t/ib_stream_incremental.sh 2012-02-13 13:04:59 +0000
75+++ test/t/ib_stream_incremental.sh 2012-05-15 19:47:20 +0000
76@@ -102,13 +102,6 @@
77 clean
78 }
79
80-for stream_format in tar xbstream; do
81- case "$stream_format" in
82- "tar")
83- stream_extract_cmd="$TAR -ixvf";;
84- "xbstream")
85- stream_extract_cmd="xbstream -xv <";;
86- esac
87-
88- test_streaming_incremental
89-done
90+stream_format="xbstream"
91+stream_extract_cmd="xbstream -xv <"
92+test_streaming_incremental

Subscribers

People subscribed via source and target branches