1
1
drop table if exists t1,t2;
2
create table t1(n int);
3
insert into t1 values (1);
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);
17
update t1,t2 set c=a where b=d;
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;
29
ERROR 42S02: Table 'test.t2' doesn't exist
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;
36
ERROR 42S02: Table 'test.t2' doesn't exist
39
create table t1(a int);
42
Field Type Null Key Default Extra
46
CREATE TABLE t1 (c1 int);
48
FLUSH TABLES WITH READ LOCK;
49
CREATE TABLE t2 (c1 int);
53
CREATE TABLE t1 (c1 int);
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
61
2
CREATE DATABASE mysqltest_1;
62
3
FLUSH TABLES WITH READ LOCK;
63
4
DROP DATABASE mysqltest_1;
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;
71
alter table t1 auto_increment=0;
72
alter table t1 auto_increment=0;
76
drop table if exists t1;
77
create table t1 (i int);
81
flush tables with read lock;;
83
alter table t1 add column j int;
85
insert into t1 values (1,2);;
96
drop table if exists t1;
97
create table t1 (i int);
101
flush tables with read lock;;
106
drop table if exists t1,t2;
107
create table t1 (a int);
110
insert into t1 values(1);
113
select @tlwa < @tlwb;
117
drop table if exists t1;
118
create table t1 (i int);
120
lock tables t1 write;
122
flush tables with read lock;;