Skip to content

Commit

Permalink
MDEV-14545 Backup fails due to MLOG_INDEX_LOAD record
Browse files Browse the repository at this point in the history
- Fixing the windows failure of unsupported_redo test case.
mariabackup --tables-exclude option only restricts ibd file.
  • Loading branch information
Thirunarayanan committed Mar 14, 2018
1 parent e452546 commit c14733f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 32 deletions.
17 changes: 2 additions & 15 deletions mysql-test/suite/mariabackup/unsupported_redo.result
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,11 @@ CREATE TABLE t2(i int) ENGINE INNODB;
ALTER TABLE t21 FORCE, ALGORITHM=INPLACE;
# Create partial backup (excluding table t21), Ignore the
# unsupported redo log for the table t21.
t1.frm
t1.ibd
t2.frm
t2.ibd
# After partial restore operation, t21 files will be missing but t21
# table information will be present in dictionary. It will
# restrict creating the table t21 in the future test. To avoid
# that, take the copy of t21 files and drop the table later.
# Prepare the full backup
# shutdown server
# remove datadir
# xtrabackup move back
# restart server
SHOW TABLES;
Tables_in_test
t1
t2
t1.ibd
t2.ibd
DROP TABLE t1;
DROP TABLE t2;
# Move the t21 files into data directory
DROP TABLE t21;
19 changes: 2 additions & 17 deletions mysql-test/suite/mariabackup/unsupported_redo.test
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ INSERT INTO t21 VALUES(1);

let $MYSQLD_DATADIR= `select @@datadir`;
let $targetdir=$MYSQLTEST_VARDIR/tmp/bk;
let old_datadir=$MYSQLTEST_VARDIR/tmp/old_data;
--mkdir $old_datadir

CREATE TABLE t2(i int) ENGINE INNODB;
ALTER TABLE t21 FORCE, ALGORITHM=INPLACE;
Expand All @@ -65,28 +63,15 @@ ALTER TABLE t21 FORCE, ALGORITHM=INPLACE;
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup "--tables-exclude=test.t21" --target-dir=$targetdir;
--enable_result_log
--list_files $targetdir/test

--echo # After partial restore operation, t21 files will be missing but t21
--echo # table information will be present in dictionary. It will
--echo # restrict creating the table t21 in the future test. To avoid
--echo # that, take the copy of t21 files and drop the table later.
--copy_file $MYSQLD_DATADIR/test/t21.frm $old_datadir/t21.frm
--list_files $targetdir/test *.ibd

--echo # Prepare the full backup
--disable_result_log
exec $XTRABACKUP --prepare --target-dir=$targetdir;
--source include/restart_and_restore.inc
--enable_result_log

SHOW TABLES;
--list_files $targetdir/test *.ibd

DROP TABLE t1;
DROP TABLE t2;

--echo # Move the t21 files into data directory
--copy_file $old_datadir/t21.frm $MYSQLD_DATADIR/test/t21.frm

DROP TABLE t21;
rmdir $targetdir;
rmdir $old_datadir;

0 comments on commit c14733f

Please sign in to comment.