Commit 8576a7ba authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-21281 main.backup_interaction fails intermittently

With MDEV-16678, some InnoDB background tasks will acquire MDL,
and we must filter out such requests in the test.
For this test, an alternative might have been to use wait_all_purged.inc.
parent 98a67ecc
......@@ -37,7 +37,7 @@ unlock tables;
#
backup stage start;
unlock tables;
select lock_mode from information_schema.metadata_lock_info;
select lock_mode from information_schema.metadata_lock_info where thread_id>0;
lock_mode
MDL_BACKUP_START
lock table t1 write;
......@@ -98,11 +98,11 @@ drop table t1;
create table t1(a int) engine=InnoDB;
begin;
insert into t1 values(1);
select lock_mode from information_schema.metadata_lock_info;
select lock_mode from information_schema.metadata_lock_info where thread_id>0;
lock_mode
MDL_SHARED_WRITE
backup stage start;
select lock_mode from information_schema.metadata_lock_info;
select lock_mode from information_schema.metadata_lock_info where thread_id>0;
lock_mode
MDL_BACKUP_START
backup stage block_commit;
......@@ -205,12 +205,12 @@ begin;
select * from t1;
col1
1
select lock_mode from information_schema.metadata_lock_info;
select lock_mode from information_schema.metadata_lock_info where thread_id>0;
lock_mode
MDL_BACKUP_WAIT_COMMIT
MDL_SHARED_READ
backup stage end;
select lock_mode from information_schema.metadata_lock_info;
select lock_mode from information_schema.metadata_lock_info where thread_id>0;
lock_mode
drop table t1;
#
......
......@@ -52,7 +52,7 @@ unlock tables;
--echo #
backup stage start;
unlock tables;
select lock_mode from information_schema.metadata_lock_info;
select lock_mode from information_schema.metadata_lock_info where thread_id>0;
--error ER_BACKUP_LOCK_IS_ACTIVE
lock table t1 write;
......@@ -121,9 +121,9 @@ drop table t1;
create table t1(a int) engine=InnoDB;
begin;
insert into t1 values(1);
select lock_mode from information_schema.metadata_lock_info;
select lock_mode from information_schema.metadata_lock_info where thread_id>0;
backup stage start;
select lock_mode from information_schema.metadata_lock_info;
select lock_mode from information_schema.metadata_lock_info where thread_id>0;
backup stage block_commit;
commit;
backup stage end;
......@@ -224,9 +224,9 @@ backup stage start;
backup stage block_commit;
begin;
select * from t1;
select lock_mode from information_schema.metadata_lock_info;
select lock_mode from information_schema.metadata_lock_info where thread_id>0;
backup stage end;
select lock_mode from information_schema.metadata_lock_info;
select lock_mode from information_schema.metadata_lock_info where thread_id>0;
drop table t1;
--echo #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment