~drizzle-trunk/drizzle/development

1 by brian
clean slate
1
#
2
# Test for Bug #2385 CREATE TABLE LIKE lacks locking on source and destination
3
# table
4
#
5
6
--disable_warnings
7
drop table if exists t1,t2;
8
--enable_warnings
9
10
connect (con1,localhost,root,,);
11
connect (con2,localhost,root,,);
12
13
# locking of source:
14
15
CREATE TABLE t1 (x1 int);
16
let $1= 10;
17
while ($1)
18
{
19
  connection con1;
20
    send ALTER TABLE t1 CHANGE x1 x2 int;
21
  connection con2;
22
    CREATE TABLE t2 LIKE t1;
23
    replace_result x1 xx x2 xx;
24
    SHOW CREATE TABLE t2;
25
    DROP TABLE t2;
26
  connection con1;
27
    reap;
28
    send ALTER TABLE t1 CHANGE x2 x1 int;
29
  connection con2;
30
    CREATE TABLE t2 LIKE t1;
31
    replace_result x1 xx x2 xx;
32
    SHOW CREATE TABLE t2;
33
    DROP TABLE t2;
34
  connection con1;
35
    reap;
36
  dec $1;
37
}
38
DROP TABLE t1;
39
40
# End of 4.1 tests