Debian Codegraph @

mysql-test/suite/mariabackup/drop_table_during_backup.test

raw
1 --source include/have_debug.inc
2 let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
3 CREATE TABLE t1 (i int) ENGINE=INNODB;
4 CREATE TABLE t2 (i int) ENGINE=INNODB;
5 CREATE TABLE t3 (i int) ENGINE=INNODB;
6 CREATE TABLE t4 (i int) ENGINE=INNODB;
7 CREATE TABLE t5 (i int) ENGINE=INNODB;
8
9 set global innodb_log_checkpoint_now=1;
10
11 --let before_copy_test_t1=DROP TABLE test.t1
12 --let after_copy_test_t2=DROP TABLE test.t2;
13 # MDEV-18185, drop + rename combination
14 --let after_copy_test_t5=BEGIN NOT ATOMIC DROP TABLE test.t5; RENAME TABLE test.t4 TO test.t5; END
15
16 --disable_result_log
17 exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events;
18 --enable_result_log
19
20 echo # xtrabackup prepare;
21 --disable_result_log
22 exec $XTRABACKUP --prepare --target-dir=$targetdir;
23 -- source include/restart_and_restore.inc
24 --enable_result_log
25
26 #check that the table t1 does not exist in backup
27 CREATE TABLE t1(i int);
28 DROP TABLE t1;
29 CREATE TABLE t2(i int);
30 DROP TABLE t2;
31 DROP TABLE t3;
32 CREATE TABLE t4(i int);
33 DROP TABLE t4;
34 DROP TABLE t5;
35 rmdir $targetdir;