2200.2.7
by Stewart Smith
add a test for ALTER TABLE with both renaming the table and another operation. |
1 |
CREATE TABLE t1 (a int primary key); |
2 |
ALTER TABLE t1 RENAME t2, ADD COLUMN b int; |
|
3 |
show tables; |
|
4 |
Tables_in_test
|
|
5 |
t2
|
|
6 |
show create table t2; |
|
7 |
Table Create Table |
|
8 |
t2 CREATE TABLE `t2` ( |
|
9 |
`a` INT NOT NULL, |
|
10 |
`b` INT DEFAULT NULL, |
|
2363.1.5
by Brian Aker
This patch fixes 798940, we will also just now add the type of index to our create statements. |
11 |
PRIMARY KEY (`a`) USING BTREE |
2200.2.7
by Stewart Smith
add a test for ALTER TABLE with both renaming the table and another operation. |
12 |
) ENGINE=InnoDB COLLATE = utf8_general_ci |
13 |
ALTER TABLE t2 ADD COLUMN c int, rename t3; |
|
14 |
show tables; |
|
15 |
Tables_in_test
|
|
16 |
t3
|
|
17 |
show create table t3; |
|
18 |
Table Create Table |
|
19 |
t3 CREATE TABLE `t3` ( |
|
20 |
`a` INT NOT NULL, |
|
21 |
`b` INT DEFAULT NULL, |
|
22 |
`c` INT DEFAULT NULL, |
|
2363.1.5
by Brian Aker
This patch fixes 798940, we will also just now add the type of index to our create statements. |
23 |
PRIMARY KEY (`a`) USING BTREE |
2200.2.7
by Stewart Smith
add a test for ALTER TABLE with both renaming the table and another operation. |
24 |
) ENGINE=InnoDB COLLATE = utf8_general_ci |
2200.2.8
by Stewart Smith
in test for ALTER TABLE including RENAME and others, add a test for DISABLE KEYS, RENAME as there is a special RENAME TABLE code path for this case. |
25 |
ALTER TABLE t3 DISABLE KEYS, RENAME t4; |
26 |
Warnings: |
|
27 |
Note 1031 Table storage engine for 't3' doesn't have this option |
|
28 |
show tables;
|
|
29 |
Tables_in_test
|
|
30 |
t4
|
|
31 |
show create table t4;
|
|
32 |
Table Create Table
|
|
33 |
t4 CREATE TABLE `t4` (
|
|
34 |
`a` INT NOT NULL,
|
|
35 |
`b` INT DEFAULT NULL,
|
|
36 |
`c` INT DEFAULT NULL,
|
|
2363.1.5
by Brian Aker
This patch fixes 798940, we will also just now add the type of index to our create statements. |
37 |
PRIMARY KEY (`a`) USING BTREE
|
2200.2.8
by Stewart Smith
in test for ALTER TABLE including RENAME and others, add a test for DISABLE KEYS, RENAME as there is a special RENAME TABLE code path for this case. |
38 |
) ENGINE=InnoDB COLLATE = utf8_general_ci
|
2200.2.9
by Stewart Smith
add a utterly insane test of combination of renaming table and disable/enable keys to alter_table_rename_plus test |
39 |
ALTER TABLE t4 ENABLE KEYS, RENAME t5, DISABLE KEYS, RENAME t6, ENABLE KEYS;
|
40 |
Warnings:
|
|
41 |
Note 1031 Table storage engine for 't4' doesn't have this option |
|
42 |
show tables; |
|
43 |
Tables_in_test
|
|
44 |
t6
|
|
45 |
show create table t6; |
|
46 |
Table Create Table |
|
47 |
t6 CREATE TABLE `t6` ( |
|
48 |
`a` INT NOT NULL, |
|
49 |
`b` INT DEFAULT NULL, |
|
50 |
`c` INT DEFAULT NULL, |
|
2363.1.5
by Brian Aker
This patch fixes 798940, we will also just now add the type of index to our create statements. |
51 |
PRIMARY KEY (`a`) USING BTREE |
2200.2.9
by Stewart Smith
add a utterly insane test of combination of renaming table and disable/enable keys to alter_table_rename_plus test |
52 |
) ENGINE=InnoDB COLLATE = utf8_general_ci |
53 |
DROP TABLE t6; |