Merge lp:~sergei.glushchenko/percona-xtrabackup/xb21-bug1112224 into lp:percona-xtrabackup/2.1

Proposed by Sergei Glushchenko
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 521
Proposed branch: lp:~sergei.glushchenko/percona-xtrabackup/xb21-bug1112224
Merge into: lp:percona-xtrabackup/2.1
Diff against target: 66 lines (+49/-1)
2 files modified
src/xtrabackup.cc (+6/-1)
test/t/bug1112224.sh (+43/-0)
To merge this branch: bzr merge lp:~sergei.glushchenko/percona-xtrabackup/xb21-bug1112224
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
George Ormond Lorch III (community) g2 Approve
Review via email: mp+146557@code.launchpad.net

Description of the change

Bug #1112224 Missing space_id from *.ibd.meta Leads to Assertion.
Assertion has been replaced with error message.

To post a comment you must log in.
Revision history for this message
George Ormond Lorch III (gl-az) :
review: Approve (g2)
Revision history for this message
Alexey Kopytov (akopytov) wrote :
Revision history for this message
Alexey Kopytov (akopytov) wrote :

Same comment as in 2.0 MP.

review: Needs Fixing
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Fixed.

Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

Fixed

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 'src/xtrabackup.cc'
2--- src/xtrabackup.cc 2013-03-11 19:11:29 +0000
3+++ src/xtrabackup.cc 2013-03-18 14:20:37 +0000
4@@ -3940,8 +3940,13 @@
5 }
6 }
7
8+ if (space_id == ULINT_UNDEFINED)
9+ {
10+ msg("xtrabackup: Error: Cannot handle DDL operation on tablespace "
11+ "%s\n", dest_space_name);
12+ exit(EXIT_FAILURE);
13+ }
14 mutex_enter(&fil_system->mutex);
15- ut_a(space_id != ULINT_UNDEFINED);
16 fil_space = xb_space_get_by_id(space_id);
17 mutex_exit(&fil_system->mutex);
18 if (fil_space != NULL) {
19
20=== added file 'test/t/bug1112224.sh'
21--- test/t/bug1112224.sh 1970-01-01 00:00:00 +0000
22+++ test/t/bug1112224.sh 2013-03-18 14:20:37 +0000
23@@ -0,0 +1,43 @@
24+########################################################################
25+# Bug #1112224: Missing space_id from *.ibd.meta Leads to Assertion
26+########################################################################
27+
28+. inc/common.sh
29+
30+start_server --innodb_file_per_table
31+
32+run_cmd $MYSQL $MYSQL_ARGS test <<EOF
33+CREATE TABLE t1(a INT) ENGINE=InnoDB;
34+INSERT INTO t1 VALUES (4), (5), (6);
35+EOF
36+
37+# Full backup
38+# backup root directory
39+vlog "Starting backup"
40+innobackupex --no-timestamp $topdir/full
41+
42+vlog "Rotating the table"
43+
44+run_cmd $MYSQL $MYSQL_ARGS test <<EOF
45+RENAME TABLE t1 TO t12;
46+EOF
47+
48+vlog "Creating incremental backup"
49+
50+innobackupex --incremental --no-timestamp \
51+ --incremental-basedir=$topdir/full $topdir/inc
52+
53+# remove space_id = something line from .meta file
54+sed -ie '/space_id/ d' $topdir/inc/test/t12.ibd.meta
55+vlog "Preparing backup"
56+
57+innobackupex --apply-log --redo-only $topdir/full
58+vlog "Log applied to full backup"
59+
60+# Command should fail and print error message
61+run_cmd_expect_failure $IB_BIN $IB_ARGS --apply-log --redo-only --incremental-dir=$topdir/inc \
62+ $topdir/full
63+if ! grep -q "Cannot handle DDL operation" $OUTFILE
64+then
65+ die "Error message not found!"
66+fi

Subscribers

People subscribed via source and target branches