summaryrefslogtreecommitdiff
path: root/mysql-test/suite/mariabackup/nolock_ddl_during_backup_end.test
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2018-09-14 09:35:18 +0100
committerVladislav Vaintroub <wlad@mariadb.com>2018-09-14 09:36:02 +0100
commit6b2da933592b54616467d08313fcb1d958fc67e4 (patch)
treec77c5f41737a24d90d84ca29708f7b8e6cfe0586 /mysql-test/suite/mariabackup/nolock_ddl_during_backup_end.test
parent28f08d3753eb10a1393a63e6c581d43aad9f93b9 (diff)
downloadmariadb-git-6b2da933592b54616467d08313fcb1d958fc67e4.tar.gz
MDEV-17192 Backup with -no-lock should fail, if DDL is detected at the end of backup
Diffstat (limited to 'mysql-test/suite/mariabackup/nolock_ddl_during_backup_end.test')
-rw-r--r--mysql-test/suite/mariabackup/nolock_ddl_during_backup_end.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/suite/mariabackup/nolock_ddl_during_backup_end.test b/mysql-test/suite/mariabackup/nolock_ddl_during_backup_end.test
new file mode 100644
index 00000000000..f6bc51bd9a6
--- /dev/null
+++ b/mysql-test/suite/mariabackup/nolock_ddl_during_backup_end.test
@@ -0,0 +1,14 @@
+--source include/have_debug.inc
+let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
+mkdir $targetdir;
+
+CREATE TABLE t1(i int) ENGINE=INNODB;
+
+# this will table and populate it, after backup has list of tables to be copied
+--let backup_fix_ddl=BEGIN NOT ATOMIC DROP TABLE test.t1;DO SLEEP(10000); END
+echo # xtrabackup backup;
+--disable_result_log
+error 1;
+exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --no-lock --dbug=+d,mariabackup_events;
+--enable_result_log
+rmdir $targetdir;