2019-01-31 02:20:51 +05:30
|
|
|
--source include/have_debug.inc
|
2019-05-29 08:28:15 +03:00
|
|
|
# This test is slow on buildbot.
|
|
|
|
--source include/big_test.inc
|
2017-11-23 21:01:00 +00:00
|
|
|
call mtr.add_suppression("InnoDB: New log files created");
|
|
|
|
|
|
|
|
let $basedir=$MYSQLTEST_VARDIR/tmp/backup;
|
|
|
|
let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1;
|
|
|
|
|
2022-08-04 09:30:53 +03:00
|
|
|
SET GLOBAL innodb_file_per_table=0;
|
2017-11-23 21:01:00 +00:00
|
|
|
CREATE TABLE t(a varchar(40) PRIMARY KEY, b varchar(40), c varchar(40), d varchar(40), index(b,c,d)) ENGINE INNODB;
|
|
|
|
|
|
|
|
echo # Create full backup , modify table, then create incremental/differential backup;
|
|
|
|
--disable_result_log
|
2023-12-03 14:09:43 +02:00
|
|
|
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$basedir;
|
2017-11-23 21:01:00 +00:00
|
|
|
--enable_result_log
|
2019-01-31 02:20:51 +05:30
|
|
|
|
2022-08-04 09:30:53 +03:00
|
|
|
SET debug_dbug='+d,skip_page_checksum',foreign_key_checks=0,unique_checks=0;
|
2017-11-23 21:01:00 +00:00
|
|
|
BEGIN;
|
|
|
|
INSERT INTO t select uuid(), uuid(), uuid(), uuid() from seq_1_to_100000;
|
|
|
|
COMMIT;
|
|
|
|
SELECT count(*) FROM t;
|
|
|
|
|
2021-05-17 18:12:33 +03:00
|
|
|
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$basedir --dbug=+d,page_intermittent_checksum_mismatch;
|
2017-11-23 21:01:00 +00:00
|
|
|
|
|
|
|
--disable_result_log
|
|
|
|
echo # Prepare full backup, apply incremental one;
|
2020-06-18 12:13:31 +03:00
|
|
|
exec $XTRABACKUP --prepare --verbose --target-dir=$basedir;
|
2019-01-31 02:20:51 +05:30
|
|
|
|
2020-06-18 12:13:31 +03:00
|
|
|
exec $XTRABACKUP --prepare --verbose --target-dir=$basedir --incremental-dir=$incremental_dir ;
|
2017-11-23 21:01:00 +00:00
|
|
|
|
|
|
|
echo # Restore and check results;
|
|
|
|
let $targetdir=$basedir;
|
|
|
|
|
|
|
|
let $_datadir= `SELECT @@datadir`;
|
|
|
|
let $innodb_data_file_path=`SELECT @@innodb_data_file_path`;
|
|
|
|
echo # shutdown server;
|
|
|
|
--source include/shutdown_mysqld.inc
|
|
|
|
echo # remove datadir;
|
|
|
|
rmdir $_datadir;
|
|
|
|
echo # xtrabackup move back;
|
|
|
|
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --copy-back --datadir=$_datadir "--innodb_data_file_path=$innodb_data_file_path" --target-dir=$targetdir;
|
|
|
|
echo # restart server;
|
|
|
|
--source include/start_mysqld.inc
|
|
|
|
|
|
|
|
--enable_result_log
|
|
|
|
SELECT count(*) FROM t;
|
|
|
|
DROP TABLE t;
|
|
|
|
|
|
|
|
# Cleanup
|
|
|
|
rmdir $basedir;
|
|
|
|
rmdir $incremental_dir;
|