mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge Bug#43230 into mysql-5.1-bugteam
This commit is contained in:
@@ -96,6 +96,61 @@ alter table t1 auto_increment=0;
|
||||
alter table t1 auto_increment=0;
|
||||
unlock tables;
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
create table t2 like t1;
|
||||
# con1
|
||||
lock tables t1 write;
|
||||
# con2
|
||||
flush tables with read lock;
|
||||
# con5
|
||||
# global read lock is taken
|
||||
# con3
|
||||
select * from t2 for update;
|
||||
# waiting for release of read lock
|
||||
# con4
|
||||
# would hang and later cause a deadlock
|
||||
flush tables t2;
|
||||
# clean up
|
||||
unlock tables;
|
||||
unlock tables;
|
||||
a
|
||||
drop table t1,t2;
|
||||
#
|
||||
# Lightweight version:
|
||||
# Ensure that the wait for a GRL is done before opening tables.
|
||||
#
|
||||
create table t1 (a int);
|
||||
create table t2 like t1;
|
||||
#
|
||||
# UPDATE
|
||||
#
|
||||
# default
|
||||
flush tables with read lock;
|
||||
# con1
|
||||
update t2 set a = 1;
|
||||
# default
|
||||
# statement is waiting for release of read lock
|
||||
# con2
|
||||
flush table t2;
|
||||
# default
|
||||
unlock tables;
|
||||
# con1
|
||||
#
|
||||
# LOCK TABLES .. WRITE
|
||||
#
|
||||
# default
|
||||
flush tables with read lock;
|
||||
# con1
|
||||
lock tables t2 write;
|
||||
# default
|
||||
# statement is waiting for release of read lock
|
||||
# con2
|
||||
flush table t2;
|
||||
# default
|
||||
unlock tables;
|
||||
# con1
|
||||
unlock tables;
|
||||
drop table t1,t2;
|
||||
End of 5.0 tests
|
||||
create table t1 (i int);
|
||||
lock table t1 read;
|
||||
|
||||
Reference in New Issue
Block a user