1
by brian
clean slate |
1 |
#
|
2 |
# Test of lock tables |
|
3 |
#
|
|
4 |
||
5 |
--disable_warnings
|
|
6 |
drop table if exists t1,t2; |
|
7 |
--enable_warnings
|
|
8 |
||
9 |
create table t1 ( n int auto_increment primary key); |
|
10 |
lock tables t1 write; |
|
11 |
insert into t1 values(NULL); |
|
12 |
unlock tables; |
|
13 |
check table t1; |
|
14 |
lock tables t1 write, t1 as t0 read; |
|
15 |
insert into t1 values(NULL); |
|
16 |
unlock tables; |
|
17 |
check table t1; |
|
18 |
lock tables t1 write, t1 as t0 read, t1 as t2 read; |
|
19 |
insert into t1 values(NULL); |
|
20 |
unlock tables; |
|
21 |
check table t1; |
|
22 |
lock tables t1 write, t1 as t0 write, t1 as t2 read; |
|
23 |
insert into t1 values(NULL); |
|
24 |
unlock tables; |
|
25 |
check table t1; |
|
26 |
lock tables t1 write, t1 as t0 write, t1 as t2 read, t1 as t3 read; |
|
27 |
insert into t1 values(NULL); |
|
28 |
unlock tables; |
|
29 |
check table t1; |
|
30 |
lock tables t1 write, t1 as t0 write, t1 as t2 write; |
|
31 |
insert into t1 values(NULL); |
|
32 |
unlock tables; |
|
33 |
check table t1; |
|
34 |
drop table t1; |
|
35 |
||
36 |
#
|
|
37 |
# Test of locking and delete of files |
|
38 |
#
|
|
39 |
||
40 |
CREATE TABLE t1 (a int); |
|
41 |
CREATE TABLE t2 (a int); |
|
42 |
lock tables t1 write,t1 as b write, t2 write, t2 as c read; |
|
43 |
drop table t1,t2; |
|
44 |
||
45 |
CREATE TABLE t1 (a int); |
|
46 |
CREATE TABLE t2 (a int); |
|
47 |
lock tables t1 write,t1 as b write, t2 write, t2 as c read; |
|
48 |
drop table t2,t1; |
|
49 |
unlock tables; |
|
50 |
||
51 |
# End of 4.1 tests |
|
52 |
||
53 |
#
|
|
54 |
# Bug#23588 SHOW COLUMNS on a temporary table causes locking issues |
|
55 |
#
|
|
56 |
create temporary table t1(f1 int); |
|
57 |
lock tables t1 write; |
|
58 |
insert into t1 values (1); |
|
59 |
show columns from t1; |
|
60 |
insert into t1 values(2); |
|
61 |
drop table t1; |
|
62 |
unlock tables; |
|
63 |
||
64 |
# End of 5.0 tests |