flush.result 1.43 KB
Newer Older
1 2
drop table if exists t1,t2;
drop database if exists mysqltest;
unknown's avatar
unknown committed
3 4 5 6
create temporary table t1(n int not null primary key);
create table t2(n int);
insert into t2 values(3);
select * from t1;
7 8
n
3
unknown's avatar
unknown committed
9 10
flush tables with read lock;
drop table t2;
11
ERROR HY000: Can't execute the query because you have a conflicting read lock
unknown's avatar
unknown committed
12 13
 drop table t2;
unlock tables;
14 15 16
create database mysqltest;
create table mysqltest.t1(n int);
insert into mysqltest.t1 values (23);
unknown's avatar
unknown committed
17
flush tables with read lock;
18 19
 drop database mysqltest;
select * from mysqltest.t1;
20
n
21
23
unknown's avatar
unknown committed
22 23 24 25 26
unlock tables;
create table t1 (n int);
flush tables with read lock;
insert into t1 values (345);
select * from t1;
27
n
28
345
unknown's avatar
unknown committed
29
drop table t1;
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
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;