blob: d1802118a096080c047b13890ad7b28448b9d91c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
--source include/have_file_key_management.inc
--source include/have_innodb.inc
CREATE TABLE t1(c VARCHAR(128)) ENGINE INNODB;
insert into t1 values(repeat('a',100));
select @@innodb_encrypt_tables;
echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir;
--enable_result_log
--source include/shutdown_mysqld.inc
echo # xtrabackup prepare export;
--disable_result_log
exec $XTRABACKUP --prepare --export --target-dir=$targetdir;
--enable_result_log
--source include/start_mysqld.inc
let MYSQLD_DATADIR=`select @@datadir`;
ALTER TABLE t1 DISCARD TABLESPACE;
copy_file $targetdir/test/t1.ibd $MYSQLD_DATADIR/test/t1.ibd;
copy_file $targetdir/test/t1.cfg $MYSQLD_DATADIR/test/t1.cfg;
ALTER TABLE t1 IMPORT TABLESPACE;
CHECK TABLE t1;
DROP TABLE t1;
rmdir $targetdir;
|