mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge mysql.com:/home/mydev/mysql-4.1-4100
into mysql.com:/home/mydev/mysql-5.0-5000 mysql-test/r/flush.result: Auto merged mysql-test/t/flush.test: Auto merged sql/sql_parse.cc: Auto merged
This commit is contained in:
@ -27,3 +27,24 @@ select * from t1;
|
||||
n
|
||||
345
|
||||
drop table t1;
|
||||
create table t1 (c1 int);
|
||||
lock table t1 write;
|
||||
flush tables with read lock;
|
||||
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
|
||||
lock table t1 read;
|
||||
flush tables with read lock;
|
||||
lock table t1 write;
|
||||
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
||||
lock table t1 read;
|
||||
lock table t1 write;
|
||||
ERROR HY000: Can't execute the query because you have a conflicting read lock
|
||||
unlock tables;
|
||||
create table t2 (c1 int);
|
||||
create table t3 (c1 int);
|
||||
lock table t1 read, t2 read, t3 write;
|
||||
flush tables with read lock;
|
||||
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
|
||||
lock table t1 read, t2 read, t3 read;
|
||||
flush tables with read lock;
|
||||
unlock tables;
|
||||
drop table t1, t2, t3;
|
||||
|
@ -70,4 +70,35 @@ insert into t1 values (345);
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#9459 - deadlock with flush with lock, and lock table write
|
||||
#
|
||||
create table t1 (c1 int);
|
||||
lock table t1 write;
|
||||
# Cannot get the global read lock with write locked tables.
|
||||
--error 1192
|
||||
flush tables with read lock;
|
||||
lock table t1 read;
|
||||
# Can get the global read lock with read locked tables.
|
||||
flush tables with read lock;
|
||||
--error 1223
|
||||
lock table t1 write;
|
||||
lock table t1 read;
|
||||
--error 1223
|
||||
lock table t1 write;
|
||||
# Release all table locks and the global read lock.
|
||||
unlock tables;
|
||||
create table t2 (c1 int);
|
||||
create table t3 (c1 int);
|
||||
lock table t1 read, t2 read, t3 write;
|
||||
# Cannot get the global read lock with write locked tables.
|
||||
--error 1192
|
||||
flush tables with read lock;
|
||||
lock table t1 read, t2 read, t3 read;
|
||||
# Can get the global read lock with read locked tables.
|
||||
flush tables with read lock;
|
||||
# Release all table locks and the global read lock.
|
||||
unlock tables;
|
||||
drop table t1, t2, t3;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
Reference in New Issue
Block a user