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 --databases option with InnoDB
6#              database
7########################################################################
8
9. inc/common.sh
10. inc/ib_part.sh
11
12start_server --innodb_directories=$TEST_VAR_ROOT/remote
13
14require_partitioning
15
16# Create InnoDB partitioned table with some partitions in
17# different location
18ib_part_init $TEST_VAR_ROOT/remote InnoDB
19
20# Saving the checksum of original table
21checksum_a=`checksum_table test test`
22
23# Take a backup
24cat >$topdir/databases_file <<EOF
25mysql
26performance_schema
27test.test
28EOF
29xtrabackup --backup --databases-file=$topdir/databases_file --target-dir=$topdir/backup
30xtrabackup --prepare --target-dir=$topdir/backup
31vlog "Backup taken"
32
33stop_server
34
35# Restore partial backup
36ib_part_restore $TEST_VAR_ROOT/remote $mysql_datadir
37
38start_server
39
40# compare checksum
41ib_part_assert_checksum $checksum_a
42