~drizzle-trunk/drizzle/development

673.3.12 by Stewart Smith
fix RENAME TABLE
1
#
2
# Bug #2397 RENAME TABLES is not blocked by
3
# FLUSH TABLES WITH READ LOCK
4
#
5
6
connect (con1,localhost,root,,);
7
connect (con2,localhost,root,,);
8
9
connection con1;
10
CREATE TABLE t1 (a int);
11
CREATE TABLE t3 (a int);
12
connection con2;
13
FLUSH TABLES WITH READ LOCK;
14
connection con1;
15
send RENAME TABLE t1 TO t2, t3 to t4;
16
connection con2;
17
show tables;
18
UNLOCK TABLES;
19
connection con1;
20
reap;
21
connection con2;
22
23
# Wait for the the tables to be renamed
24
# i.e the query below succeds
25
let $query= select * from t2, t4;
26
source include/wait_for_query_to_suceed.inc;
27
28
show tables;
29
30
drop table t2, t4;
31
32
disconnect con2;
33
disconnect con1;
34
connection default;