1
########################################################################
2
# Bug #1112224: Missing space_id from *.ibd.meta Leads to Assertion
3
########################################################################
7
start_server --innodb_file_per_table
9
run_cmd $MYSQL $MYSQL_ARGS test <<EOF
10
CREATE TABLE t1(a INT) ENGINE=InnoDB;
11
INSERT INTO t1 VALUES (4), (5), (6);
15
# backup root directory
16
vlog "Starting backup"
17
innobackupex --no-timestamp $topdir/full
19
vlog "Rotating the table"
21
run_cmd $MYSQL $MYSQL_ARGS test <<EOF
22
RENAME TABLE t1 TO t12;
25
vlog "Creating incremental backup"
27
innobackupex --incremental --no-timestamp \
28
--incremental-basedir=$topdir/full $topdir/inc
30
# remove space_id = something line from .meta file
31
sed -ie '/space_id/ d' $topdir/inc/test/t12.ibd.meta
32
vlog "Preparing backup"
34
innobackupex --apply-log --redo-only $topdir/full
35
vlog "Log applied to full backup"
37
# Command should fail and print error message
38
run_cmd_expect_failure $IB_BIN $IB_ARGS --apply-log --redo-only --incremental-dir=$topdir/inc \
40
if ! grep -q "Cannot handle DDL operation" $OUTFILE
42
die "Error message not found!"