~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/lock_multi.result

  • Committer: Brian Aker
  • Date: 2009-06-05 23:10:06 UTC
  • mto: This revision was merged to the branch mainline in revision 1055.
  • Revision ID: brian@gaz-20090605231006-01nyw7pfpj2z2v8p
Remove guts in parser for LOCK TABLE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
drop table if exists t1,t2;
2
 
create table t1(n int);
3
 
insert into t1 values (1);
4
 
lock tables t1 read;
5
 
update t1 set n = 4;
6
 
select n from t1;
7
 
n
8
 
1
9
 
unlock tables;
10
 
drop table t1;
11
 
create table t1 (a int, b int);
12
 
create table t2 (c int, d int);
13
 
insert into t1 values(1,1);
14
 
insert into t1 values(2,2);
15
 
insert into t2 values(1,2);
16
 
lock table t1 read;
17
 
update t1,t2 set c=a where b=d;
18
 
select c from t2;
19
 
c
20
 
2
21
 
unlock tables;
22
 
drop table t1;
23
 
drop table t2;
24
 
create table t1 (a int);
25
 
create table t2 (a int);
26
 
lock table t1 write, t2 write;
27
 
insert t1 select * from t2;
28
 
drop table t2;
29
 
ERROR 42S02: Table 'test.t2' doesn't exist
30
 
drop table t1;
31
 
create table t1 (a int);
32
 
create table t2 (a int);
33
 
lock table t1 write, t2 write, t1 as t1_2 write, t2 as t2_2 write;
34
 
insert t1 select * from t2;
35
 
drop table t2;
36
 
ERROR 42S02: Table 'test.t2' doesn't exist
37
 
drop table t1;
38
 
End of 4.1 tests
39
 
create table t1(a int);
40
 
lock tables t1 write;
41
 
show columns from t1;
42
 
Field   Type    Null    Key     Default Extra
43
 
a       int     YES             NULL    
44
 
unlock tables;
45
 
drop table t1;
46
 
CREATE TABLE t1 (c1 int);
47
 
LOCK TABLE t1 WRITE;
48
 
FLUSH TABLES WITH READ LOCK;
49
 
CREATE TABLE t2 (c1 int);
50
 
UNLOCK TABLES;
51
 
UNLOCK TABLES;
52
 
DROP TABLE t1, t2;
53
 
CREATE TABLE t1 (c1 int);
54
 
LOCK TABLE t1 WRITE;
55
 
FLUSH TABLES WITH READ LOCK;
56
 
CREATE TABLE t2 AS SELECT * FROM t1;
57
 
ERROR HY000: Table 't2' was not locked with LOCK TABLES
58
 
UNLOCK TABLES;
59
 
UNLOCK TABLES;
60
 
DROP TABLE t1;
61
2
CREATE DATABASE mysqltest_1;
62
3
FLUSH TABLES WITH READ LOCK;
63
4
DROP DATABASE mysqltest_1;
66
7
UNLOCK TABLES;
67
8
DROP DATABASE mysqltest_1;
68
9
ERROR HY000: Can't drop database 'mysqltest_1'; database doesn't exist
69
 
create table t1 (f1 int not null auto_increment, primary key(f1)) engine=innodb;
70
 
lock tables t1 write;
71
 
alter table t1 auto_increment=0;
72
 
alter table t1 auto_increment=0;
73
 
unlock tables;
74
 
drop table t1;
75
 
End of 5.0 tests
76
 
drop table if exists t1;
77
 
create table t1 (i int);
78
 
connection: default
79
 
lock tables t1 write;
80
 
connection: flush
81
 
flush tables with read lock;;
82
 
connection: default
83
 
alter table t1 add column j int;
84
 
connection: insert
85
 
insert into t1 values (1,2);;
86
 
connection: default
87
 
unlock tables;
88
 
connection: flush
89
 
select * from t1;
90
 
i       j
91
 
unlock tables;
92
 
select * from t1;
93
 
i       j
94
 
1       2
95
 
drop table t1;
96
 
drop table if exists t1;
97
 
create table t1 (i int);
98
 
connection: default
99
 
lock tables t1 write;
100
 
connection: flush
101
 
flush tables with read lock;;
102
 
connection: default
103
 
flush tables;
104
 
unlock tables;
105
 
drop table t1;
106
 
drop table if exists t1,t2;
107
 
create table t1 (a int);
108
 
flush status;
109
 
lock tables t1 read;
110
 
insert into t1 values(1);
111
 
unlock tables;
112
 
drop table t1;
113
 
select @tlwa < @tlwb;
114
 
@tlwa < @tlwb
115
 
1
116
10
End of 5.1 tests
117
 
drop table if exists t1;
118
 
create table t1 (i int);
119
 
connection: default
120
 
lock tables t1 write;
121
 
connection: flush
122
 
flush tables with read lock;;
123
 
connection: default
124
 
flush tables;
125
 
drop table t1;