~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysql-test/r/flush.result

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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);
 
6
select * from t1;
 
7
n
 
8
3
 
9
flush tables with read lock;
 
10
drop table t2;
 
11
ERROR HY000: Can't execute the query because you have a conflicting read lock
 
12
drop table t2;
 
13
unlock tables;
 
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;
 
20
n
 
21
23
 
22
unlock tables;
 
23
create table t1 (n int);
 
24
flush tables with read lock;
 
25
insert into t1 values (345);
 
26
select * from t1;
 
27
n
 
28
345
 
29
drop table t1;
 
30
create table t1 (c1 int);
 
31
lock table t1 write;
 
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
 
34
lock table t1 read;
 
35
flush tables with read lock;
 
36
lock table t1 write;
 
37
ERROR HY000: Can't execute the query because you have a conflicting read lock
 
38
lock table t1 read;
 
39
lock table t1 write;
 
40
ERROR HY000: Can't execute the query because you have a conflicting read lock
 
41
unlock tables;
 
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;
 
49
unlock tables;
 
50
drop table t1, t2, t3;
 
51
create table t1 (c1 int);
 
52
create table t2 (c1 int);
 
53
lock table t1 write;
 
54
flush tables with read lock;
 
55
insert into t2 values(1);
 
56
unlock tables;
 
57
drop table t1, t2;
 
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);
 
62
lock tables t1 write;
 
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
 
65
unlock tables;
 
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
 
69
unlock tables;
 
70
lock tables t1 read;
 
71
flush tables with read lock;
 
72
unlock tables;
 
73
drop table t1, t2;
 
74
set session low_priority_updates=default;
 
75
select benchmark(200, (select sin(1))) > 1000;
 
76
End of 5.0 tests
 
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;
 
81
flush logs;
 
82
unlock tables;
 
83
set global read_only=1;
 
84
flush logs;
 
85
unlock tables;
 
86
flush tables with read lock;
 
87
flush logs;
 
88
unlock tables;
 
89
set global general_log= @old_general_log;
 
90
set global read_only= @old_read_only;
 
91
End of 5.1 tests