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; ...@@ -37,7 +37,7 @@ unlock tables;
# #
backup stage start; backup stage start;
unlock tables; 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 lock_mode
MDL_BACKUP_START MDL_BACKUP_START
lock table t1 write; lock table t1 write;
...@@ -98,11 +98,11 @@ drop table t1; ...@@ -98,11 +98,11 @@ drop table t1;
create table t1(a int) engine=InnoDB; create table t1(a int) engine=InnoDB;
begin; begin;
insert into t1 values(1); 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 lock_mode
MDL_SHARED_WRITE MDL_SHARED_WRITE
backup stage start; 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 lock_mode
MDL_BACKUP_START MDL_BACKUP_START
backup stage block_commit; backup stage block_commit;
...@@ -205,12 +205,12 @@ begin; ...@@ -205,12 +205,12 @@ begin;
select * from t1; select * from t1;
col1 col1
1 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 lock_mode
MDL_BACKUP_WAIT_COMMIT MDL_BACKUP_WAIT_COMMIT
MDL_SHARED_READ MDL_SHARED_READ
backup stage end; 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 lock_mode
drop table t1; drop table t1;
# #
......
...@@ -52,7 +52,7 @@ unlock tables; ...@@ -52,7 +52,7 @@ unlock tables;
--echo # --echo #
backup stage start; backup stage start;
unlock tables; 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 --error ER_BACKUP_LOCK_IS_ACTIVE
lock table t1 write; lock table t1 write;
...@@ -121,9 +121,9 @@ drop table t1; ...@@ -121,9 +121,9 @@ drop table t1;
create table t1(a int) engine=InnoDB; create table t1(a int) engine=InnoDB;
begin; begin;
insert into t1 values(1); 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; 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; backup stage block_commit;
commit; commit;
backup stage end; backup stage end;
...@@ -224,9 +224,9 @@ backup stage start; ...@@ -224,9 +224,9 @@ backup stage start;
backup stage block_commit; backup stage block_commit;
begin; begin;
select * from t1; 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; 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; drop table t1;
--echo # --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