~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/alter_table_rename_plus.result

  • Committer: Stewart Smith
  • Date: 2011-02-28 06:44:28 UTC
  • mto: (2241.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2242.
  • Revision ID: stewart@flamingspork.com-20110228064428-7xlmxxqwm8w2z4ec
add a test for ALTER TABLE with both renaming the table and another operation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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,
 
11
  PRIMARY KEY (`a`)
 
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,
 
23
  PRIMARY KEY (`a`)
 
24
) ENGINE=InnoDB COLLATE = utf8_general_ci
 
25
DROP TABLE t3;