~sergei.glushchenko/percona-xtrabackup/21-bug856400

« back to all changes in this revision

Viewing changes to test/t/bug1112224.sh

  • Committer: Alexey Kopytov
  • Date: 2013-03-19 12:36:05 UTC
  • mfrom: (520.2.5 2.1)
  • Revision ID: akopytov@gmail.com-20130319123605-i4r1ikxjugqum05f
Merged staging-2.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
########################################################################
 
2
# Bug #1112224: Missing space_id from *.ibd.meta Leads to Assertion
 
3
########################################################################
 
4
 
 
5
. inc/common.sh
 
6
 
 
7
start_server --innodb_file_per_table
 
8
 
 
9
run_cmd $MYSQL $MYSQL_ARGS test <<EOF
 
10
CREATE TABLE t1(a INT) ENGINE=InnoDB;
 
11
INSERT INTO t1 VALUES (4), (5), (6);
 
12
EOF
 
13
 
 
14
# Full backup
 
15
# backup root directory
 
16
vlog "Starting backup"
 
17
innobackupex  --no-timestamp $topdir/full
 
18
 
 
19
vlog "Rotating the table"
 
20
 
 
21
run_cmd $MYSQL $MYSQL_ARGS test <<EOF
 
22
RENAME TABLE t1 TO t12;
 
23
EOF
 
24
 
 
25
vlog "Creating incremental backup"
 
26
 
 
27
innobackupex --incremental --no-timestamp \
 
28
    --incremental-basedir=$topdir/full $topdir/inc
 
29
 
 
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"
 
33
 
 
34
innobackupex --apply-log --redo-only $topdir/full
 
35
vlog "Log applied to full backup"
 
36
 
 
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 \
 
39
    $topdir/full
 
40
if ! grep -q "Cannot handle DDL operation" $OUTFILE
 
41
then
 
42
        die "Error message not found!"
 
43
fi