| 1 |
--source include/have_innodb.inc |
| 2 |
--source include/innodb_page_size.inc |
| 3 |
|
| 4 |
let basedir=$MYSQLTEST_VARDIR/tmp/backup; |
| 5 |
let incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1; |
| 6 |
|
| 7 |
set global innodb_fast_shutdown=0; |
| 8 |
let $restart_parameters=--innodb_undo_tablespaces=2; |
| 9 |
--source include/restart_mysqld.inc |
| 10 |
|
| 11 |
CREATE TABLE t1(a varchar(60)) ENGINE INNODB; |
| 12 |
start transaction; |
| 13 |
INSERT INTO t1 VALUES(1); |
| 14 |
|
| 15 |
--echo # xtrabackup backup |
| 16 |
--disable_result_log |
| 17 |
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir; |
| 18 |
--enable_result_log |
| 19 |
|
| 20 |
--echo # Restart the server with 4 undo tablespaces |
| 21 |
let $restart_parameters=--innodb_undo_tablespaces=4; |
| 22 |
set global innodb_fast_shutdown=0; |
| 23 |
--source include/restart_mysqld.inc |
| 24 |
|
| 25 |
let $backuplog=$MYSQLTEST_VARDIR/tmp/backup.log; |
| 26 |
--echo # incremental backup should fail |
| 27 |
--error 1 |
| 28 |
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$basedir 2> $backuplog; |
| 29 |
|
| 30 |
--let SEARCH_PATTERN=--incremental backup is impossible if the server had been restarted with different innodb_undo_tablespaces |
| 31 |
--let SEARCH_FILE=$backuplog |
| 32 |
--source include/search_pattern_in_file.inc |
| 33 |
remove_file $backuplog; |
| 34 |
rmdir $incremental_dir; |
| 35 |
rmdir $basedir; |
| 36 |
|
| 37 |
--echo # Take full backup again |
| 38 |
--disable_result_log |
| 39 |
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir; |
| 40 |
--enable_result_log |
| 41 |
--disable_result_log |
| 42 |
|
| 43 |
echo # Prepare full backup; |
| 44 |
exec $XTRABACKUP --prepare --target-dir=$basedir; |
| 45 |
|
| 46 |
--echo # Display 4 undo log files from target directory |
| 47 |
list_files $basedir undo*; |
| 48 |
|
| 49 |
DROP TABLE t1; |
| 50 |
rmdir $basedir; |