diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
commit | 3f619478f796eddbba6e39502fe941b285dd97b1 (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/backup_lock_debug.result | |
parent | Initial commit. (diff) | |
download | mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/backup_lock_debug.result')
-rw-r--r-- | mysql-test/main/backup_lock_debug.result | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/mysql-test/main/backup_lock_debug.result b/mysql-test/main/backup_lock_debug.result new file mode 100644 index 00000000..229c32a8 --- /dev/null +++ b/mysql-test/main/backup_lock_debug.result @@ -0,0 +1,55 @@ +# +# Make sure pending LOCK TABLES doesn't block BACKUP STAGE +# +CREATE TABLE t1(a INT); +LOCK TABLE t1 READ; +# +connect con1,localhost,root,,; +SET DEBUG_SYNC= 'mdl_acquire_lock_wait SIGNAL ready'; +LOCK TABLE t1 WRITE; +# +connect con2,localhost,root,,; +SET DEBUG_SYNC= 'now WAIT_FOR ready'; +BACKUP STAGE START; +BACKUP STAGE FLUSH; +BACKUP STAGE BLOCK_DDL; +BACKUP STAGE END; +disconnect con2; +# +connection default; +UNLOCK TABLES; +# +connection con1; +UNLOCK TABLES; +disconnect con1; +# +connection default; +DROP TABLE t1; +SET DEBUG_SYNC= 'RESET'; +# +# Demonstrates a deadlock if BACKUP namespace is reorder after SCHEMA. +# Culprit is ALTER TABLE taking SCHEMA lock on target database after +# BACKUP lock was acquired. +# +CREATE DATABASE test2; +CREATE TABLE t1(a INT) ENGINE=InnoDB; +connect con1,localhost,root,,; +BACKUP STAGE START; +connection default; +SET DEBUG_SYNC='alter_opened_table SIGNAL ready WAIT_FOR go'; +ALTER TABLE t1 RENAME TO test2.t1; +connection con1; +SET DEBUG_SYNC='now WAIT_FOR ready'; +SET DEBUG_SYNC='mdl_acquire_lock_wait SIGNAL ready1'; +BACKUP STAGE BLOCK_DDL; +connect con2,localhost,root,,; +SET DEBUG_SYNC='now WAIT_FOR ready1'; +SET DEBUG_SYNC='mdl_acquire_lock_wait SIGNAL go'; +DROP DATABASE test2; +connection default; +connection con1; +disconnect con1; +connection con2; +disconnect con2; +connection default; +SET DEBUG_SYNC='reset'; |