mariadb/mysql-test/suite/mariabackup/backup_lock_wait_timeout.test
Vlad Lesin d0150dc14e MDEV-20230: mariabackup --ftwrl-wait-timeout never times out on explicit
lock

--ftwrl-wait-timeout does not finish mariabackup execution when acquired
backup lock can't be grabbed for the certain amount of time, it just
waits for a long queries finishing before acquiring the lock to avoid
unnecessary locking.

This commit extends --ftwrl-wait-timeout so, that mariabackup execution
is finished if it waits for backup lock during certain amount of time.
2020-04-27 22:10:50 +03:00

28 lines
577 B
Text

--source include/have_innodb.inc
--source include/count_sessions.inc
CREATE TABLE t(i INT) ENGINE INNODB;
connect (con1,localhost,root,,);
BEGIN;
LOCK TABLES t WRITE;
--connection default
echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
--error 1
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --ftwrl-wait-timeout=1 --target-dir=$targetdir;
--enable_result_log
--connection con1
COMMIT;
--connection default
--disconnect con1
DROP TABLE t;
rmdir $targetdir;
--source include/wait_until_count_sessions.inc