| 1 |
--source include/innodb_page_size.inc |
| 2 |
--source include/innodb_undo_tablespaces.inc |
| 3 |
|
| 4 |
if (!$EXAMPLE_KEY_MANAGEMENT_SO) |
| 5 |
{ |
| 6 |
--skip needs example_key_management plugin |
| 7 |
} |
| 8 |
call mtr.add_suppression("InnoDB: New log files created"); |
| 9 |
|
| 10 |
if (`select @@innodb_page_size=65536`) |
| 11 |
{ |
| 12 |
# this needs too much memory for 32bit |
| 13 |
source include/have_64bit.inc; |
| 14 |
} |
| 15 |
|
| 16 |
|
| 17 |
let $basedir=$MYSQLTEST_VARDIR/tmp/backup; |
| 18 |
let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1; |
| 19 |
|
| 20 |
|
| 21 |
CREATE TABLE t(i INT) ENGINE INNODB ENCRYPTED=YES; |
| 22 |
INSERT INTO t VALUES(1); |
| 23 |
|
| 24 |
|
| 25 |
echo # Create full backup , modify table, then create incremental/differential backup; |
| 26 |
--disable_result_log |
| 27 |
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$basedir; |
| 28 |
--enable_result_log |
| 29 |
|
| 30 |
SET GLOBAL innodb_flush_log_at_trx_commit = 1; |
| 31 |
INSERT INTO t VALUES(2); |
| 32 |
SELECT * FROM t; |
| 33 |
|
| 34 |
--disable_result_log |
| 35 |
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$incremental_dir --incremental-basedir=$basedir; |
| 36 |
echo # Prepare full backup, apply incremental one; |
| 37 |
exec $XTRABACKUP --prepare --target-dir=$basedir; |
| 38 |
exec $XTRABACKUP --prepare --target-dir=$basedir --incremental-dir=$incremental_dir; |
| 39 |
|
| 40 |
echo # Restore and check results; |
| 41 |
let $targetdir=$basedir; |
| 42 |
-- source include/restart_and_restore.inc |
| 43 |
--enable_result_log |
| 44 |
|
| 45 |
SELECT * FROM t; |
| 46 |
DROP TABLE t; |
| 47 |
|
| 48 |
# Cleanup |
| 49 |
rmdir $basedir; |
| 50 |
rmdir $incremental_dir; |