Browse Source

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.
pull/1434/head
Marko Mäkelä 6 years ago
parent
commit
8576a7bacf
  1. 10
      mysql-test/main/backup_interaction.result
  2. 10
      mysql-test/main/backup_interaction.test

10
mysql-test/main/backup_interaction.result

@ -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;
#

10
mysql-test/main/backup_interaction.test

@ -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 #

Loading…
Cancel
Save