1######################################################################## 2# Bug #711166: Partitioned tables are not correctly handled by the 3# --databases and --tables-file options of innobackupex, 4# and by the --tables option of xtrabackup. 5# Testcase covers using --tables-file option with InnoDB 6# database and --stream mode 7######################################################################## 8 9. inc/common.sh 10. inc/ib_part.sh 11 12start_server --innodb_file_per_table --innodb_directories=$TEST_VAR_ROOT/remote 13 14require_partitioning 15 16# Create InnoDB partitioned table 17ib_part_init $TEST_VAR_ROOT/remote InnoDB 18 19# Saving the checksum of original table 20checksum_a=`checksum_table test test` 21 22# Take a backup 23# Only backup of test.test table will be taken 24cat >$topdir/tables <<EOF 25test.test 26EOF 27ib_part_add_mandatory_tables $mysql_datadir $topdir/tables 28mkdir -p $topdir/backup 29xtrabackup --backup --stream=xbstream --tables-file=$topdir/tables --target-dir=$topdir/backup > $topdir/backup/backup.xbstream 30xbstream -xv -C $topdir/backup < $topdir/backup/backup.xbstream 31xtrabackup --prepare --target-dir=$topdir/backup 32vlog "Backup taken" 33 34stop_server 35 36# Restore partial backup 37ib_part_restore $TEST_VAR_ROOT/remote $mysql_datadir 38 39start_server 40 41ib_part_assert_checksum $checksum_a 42