mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Making FLUSH TABLES WITH READ LOCK block COMMITs of existing transactions,
in a deadlock-free manner. This splits locking the global read lock in two steps. This fixes a consequence of this bug, known as: BUG#4953 'mysqldump --master-data may report incorrect binlog position if using InnoDB' And a test.
This commit is contained in:
23
mysql-test/r/flush_block_commit.result
Normal file
23
mysql-test/r/flush_block_commit.result
Normal file
@ -0,0 +1,23 @@
|
||||
drop table if exists t1;
|
||||
create table t1 (a int) type=innodb;
|
||||
begin;
|
||||
insert into t1 values(1);
|
||||
flush tables with read lock;
|
||||
select * from t1;
|
||||
a
|
||||
commit;
|
||||
select * from t1;
|
||||
a
|
||||
unlock tables;
|
||||
begin;
|
||||
select * from t1 for update;
|
||||
a
|
||||
1
|
||||
begin;
|
||||
select * from t1 for update;
|
||||
flush tables with read lock;
|
||||
commit;
|
||||
a
|
||||
1
|
||||
unlock tables;
|
||||
drop table t1;
|
Reference in New Issue
Block a user