mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
232dc9221d
(otherwise a deadlock when ALTER writes to binlog holding LOCK_open, it causes binlog rotation, binlog waits for prepared transactions to commit, and commit needs LOCK_open to check for global read lock) mysql-test/r/flush.result: global read lock code now uses a dedicated mutex mysql-test/t/flush.test: global read lock code now uses a dedicated mutex sql/lock.cc: global read lock code now uses a dedicated mutex sql/mysql_priv.h: global read lock code now uses a dedicated mutex sql/mysqld.cc: global read lock code now uses a dedicated mutex sql/sql_table.cc: global read lock code now uses a dedicated mutex
29 lines
667 B
Text
29 lines
667 B
Text
drop table if exists t1,t2;
|
|
drop database if exists mysqltest;
|
|
create temporary table t1(n int not null primary key);
|
|
create table t2(n int);
|
|
insert into t2 values(3);
|
|
select * from t1;
|
|
n
|
|
3
|
|
flush tables with read lock;
|
|
drop table t2;
|
|
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
|
drop table t2;
|
|
unlock tables;
|
|
create database mysqltest;
|
|
create table mysqltest.t1(n int);
|
|
insert into mysqltest.t1 values (23);
|
|
flush tables with read lock;
|
|
drop database mysqltest;
|
|
select * from mysqltest.t1;
|
|
n
|
|
23
|
|
unlock tables;
|
|
create table t1 (n int);
|
|
flush tables with read lock;
|
|
insert into t1 values (345);
|
|
select * from t1;
|
|
n
|
|
345
|
|
drop table t1;
|