Skip to content
Permalink
Browse files
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.
  • Loading branch information
dr-m committed Jan 13, 2020
1 parent 98a67ec commit 8576a7b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
@@ -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 #

0 comments on commit 8576a7b

Please sign in to comment.