| 1 |
--source include/have_innodb.inc |
| 2 |
|
| 3 |
CREATE TABLE t(i INT) ENGINE INNODB; |
| 4 |
INSERT INTO t VALUES(1); |
| 5 |
|
| 6 |
echo # xtrabackup backup; |
| 7 |
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; |
| 8 |
--let $backup_log=$MYSQLTEST_VARDIR/tmp/backup.log |
| 9 |
|
| 10 |
--disable_result_log |
| 11 |
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir > $backup_log 2>&1; |
| 12 |
--enable_result_log |
| 13 |
|
| 14 |
echo # xtrabackup prepare; |
| 15 |
--disable_result_log |
| 16 |
exec $XTRABACKUP --prepare --target-dir=$targetdir; |
| 17 |
|
| 18 |
# If MDEV-28187 is not fixed, the following tries to copy backup to data |
| 19 |
# directory will fail, because their destination path will be the same as |
| 20 |
# their source path |
| 21 |
|
| 22 |
--let $backup_opts=--innodb_undo_directory=./ |
| 23 |
--source include/restart_and_restore.inc |
| 24 |
|
| 25 |
--let $backup_opts=--innodb_log_group_home_dir=./ |
| 26 |
--source include/restart_and_restore.inc |
| 27 |
|
| 28 |
--let $backup_opts=--innodb_data_home_dir=./ |
| 29 |
--source include/restart_and_restore.inc |
| 30 |
|
| 31 |
--enable_result_log |
| 32 |
|
| 33 |
SELECT * FROM t; |
| 34 |
DROP TABLE t; |
| 35 |
rmdir $targetdir; |