1
drop table if exists t1,t2;
2
drop database if exists mysqltest;
3
create temporary table t1(n int not null primary key);
4
create table t2(n int);
5
insert into t2 values(3);
9
flush tables with read lock;
11
ERROR HY000: Can't execute the query because you have a conflicting read lock
14
create database mysqltest;
15
create table mysqltest.t1(n int);
16
insert into mysqltest.t1 values (23);
17
flush tables with read lock;
18
drop database mysqltest;
19
select * from mysqltest.t1;
23
create table t1 (n int);
24
flush tables with read lock;
25
insert into t1 values (345);
30
create table t1 (c1 int);
32
flush tables with read lock;
33
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
35
flush tables with read lock;
37
ERROR HY000: Can't execute the query because you have a conflicting read lock
40
ERROR HY000: Can't execute the query because you have a conflicting read lock
42
create table t2 (c1 int);
43
create table t3 (c1 int);
44
lock table t1 read, t2 read, t3 write;
45
flush tables with read lock;
46
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
47
lock table t1 read, t2 read, t3 read;
48
flush tables with read lock;
50
drop table t1, t2, t3;
51
create table t1 (c1 int);
52
create table t2 (c1 int);
54
flush tables with read lock;
55
insert into t2 values(1);
58
drop table if exists t1, t2;
59
set session low_priority_updates=1;
60
create table t1 (a int);
61
create table t2 (b int);
63
flush tables with read lock;
64
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
66
lock tables t1 read, t2 write;
67
flush tables with read lock;
68
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
71
flush tables with read lock;
74
set session low_priority_updates=default;
75
select benchmark(200, (select sin(1))) > 1000;
77
set @old_general_log= @@general_log;
78
set @old_read_only= @@read_only;
79
set global general_log= on;
80
flush tables with read lock;
83
set global read_only=1;
86
flush tables with read lock;
89
set global general_log= @old_general_log;
90
set global read_only= @old_read_only;