diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-06-02 14:40:51 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-06-02 14:40:51 +0300 |
commit | 6df2f2db11bf0a559db54e18315ad37e6a4d5573 (patch) | |
tree | 00dcd66bc57c933bd17a399e544935ee251bd4c1 /mysql-test/main | |
parent | 0d6d63e1505bbf9898d46fa641a7a0579a4ae460 (diff) | |
download | mariadb-git-6df2f2db11bf0a559db54e18315ad37e6a4d5573.tar.gz |
MDEV-21546 main.backup_stages occasionally reports lock wait timeout
With MDEV-16678, InnoDB background tasks (most notably, the purge of
committed transaction history) can acquire metadata locks.
Because of this, the lock_wait_timeout=0 is too strict and must
be relaxed.
The test used to fail easily if an extra sleep was added to
the end of dict_table_close(), before the MDL release. Now,
with lock_wait_timeout=1, the test passes even with an extra
0.1-second sleep added to dict_table_close().
Thanks to Monty for providing this fix.
Diffstat (limited to 'mysql-test/main')
-rw-r--r-- | mysql-test/main/backup_stages.result | 4 | ||||
-rw-r--r-- | mysql-test/main/backup_stages.test | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/mysql-test/main/backup_stages.result b/mysql-test/main/backup_stages.result index caea1fda0b9..4704a4b6bd1 100644 --- a/mysql-test/main/backup_stages.result +++ b/mysql-test/main/backup_stages.result @@ -63,7 +63,7 @@ INSERT INTO t_permanent_myisam SET col1 = 1; connect backup,localhost,root,,; connect con11,localhost,root,,; SET AUTOCOMMIT = 0; -set session lock_wait_timeout=0; +set session lock_wait_timeout=1; connect con12,localhost,root,,; SET AUTOCOMMIT = 1; # Between (connection default) BACKUP STAGE START and FLUSH @@ -208,7 +208,7 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction DROP TABLE t_con1_myisam; ERROR HY000: Lock wait timeout exceeded; try restarting transaction connection con12; -SET STATEMENT lock_wait_timeout=0 FOR UPDATE t_permanent_innodb SET col1 = 9; +SET STATEMENT lock_wait_timeout=1 FOR UPDATE t_permanent_innodb SET col1 = 9; ERROR HY000: Lock wait timeout exceeded; try restarting transaction connection backup; BACKUP STAGE END; diff --git a/mysql-test/main/backup_stages.test b/mysql-test/main/backup_stages.test index ba9c15a1d7e..e8cc5f7a7b9 100644 --- a/mysql-test/main/backup_stages.test +++ b/mysql-test/main/backup_stages.test @@ -119,7 +119,7 @@ INSERT INTO t_permanent_myisam SET col1 = 1; --connect(backup,localhost,root,,) --connect(con11,localhost,root,,) SET AUTOCOMMIT = 0; -set session lock_wait_timeout=0; +set session lock_wait_timeout=1; --connect(con12,localhost,root,,) SET AUTOCOMMIT = 1; @@ -244,7 +244,7 @@ DROP TABLE t_con1_innodb; DROP TABLE t_con1_myisam; --connection con12 --error ER_LOCK_WAIT_TIMEOUT -SET STATEMENT lock_wait_timeout=0 FOR UPDATE t_permanent_innodb SET col1 = 9; +SET STATEMENT lock_wait_timeout=1 FOR UPDATE t_permanent_innodb SET col1 = 9; --connection backup BACKUP STAGE END; |