2017-11-06 19:58:04 +01:00
|
|
|
let $targetdir=$MYSQLTEST_VARDIR/backup;
|
|
|
|
mkdir $targetdir;
|
|
|
|
mkdir $MYSQLTEST_VARDIR/partitdata;
|
2017-11-06 22:00:06 +01:00
|
|
|
|
|
|
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
2017-11-06 19:58:04 +01:00
|
|
|
eval CREATE TABLE t(i int)
|
|
|
|
ENGINE=InnoDB
|
|
|
|
PARTITION BY RANGE (i)
|
|
|
|
(PARTITION p0 VALUES LESS THAN (100),
|
|
|
|
PARTITION P1 VALUES LESS THAN (200),
|
2017-11-06 22:00:06 +01:00
|
|
|
PARTITION p2 VALUES LESS THAN (300) DATA DIRECTORY = '$MYSQLTEST_VARDIR/partitdata',
|
|
|
|
PARTITION p3 VALUES LESS THAN (400) DATA DIRECTORY = '$MYSQLTEST_VARDIR/partitdata',
|
2017-11-06 19:58:04 +01:00
|
|
|
PARTITION p4 VALUES LESS THAN MAXVALUE);
|
|
|
|
INSERT INTO t VALUES (1), (101), (201), (301), (401);
|
|
|
|
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
|
|
|
|
exec $XTRABACKUP --prepare --target-dir=$targetdir;
|
|
|
|
DROP TABLE t;
|
|
|
|
rmdir $MYSQLTEST_VARDIR/partitdata;
|
|
|
|
--source include/restart_and_restore.inc
|
|
|
|
--enable_result_log
|
|
|
|
SELECT * FROM t;
|
|
|
|
DROP TABLE t;
|
|
|
|
rmdir $targetdir;
|
|
|
|
rmdir $MYSQLTEST_VARDIR/partitdata;
|