~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/alter_table.test

  • Committer: Monty Taylor
  • Date: 2010-03-11 18:27:20 UTC
  • mfrom: (1333 staging)
  • mto: This revision was merged to the branch mainline in revision 1348.
  • Revision ID: mordred@inaugust.com-20100311182720-hd1h87y6cb1b1mp0
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
NAME varchar(80) DEFAULT '' NOT NULL,
40
40
PRIMARY KEY (GROUP_ID,LANG_ID),
41
41
KEY NAME (NAME));
42
 
#show table status like "t1";
 
42
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
43
43
ALTER TABLE t1 CHANGE NAME NAME CHAR(80) not null;
44
44
--replace_column 8 #
45
 
SHOW FULL COLUMNS FROM t1;
 
45
show COLUMNS FROM t1;
46
46
DROP TABLE t1;
47
47
 
48
48
#
163
163
) ENGINE=MyISAM;
164
164
 
165
165
ALTER TABLE t1 DISABLE KEYS;
166
 
SHOW INDEX FROM t1;
 
166
#SHOW INDEX FROM t1;
167
167
INSERT INTO t1 VALUES ('localhost','root'),('localhost','');
168
 
SHOW INDEX FROM t1;
 
168
#SHOW INDEX FROM t1;
169
169
ALTER TABLE t1 ENABLE KEYS;
170
 
SHOW INDEX FROM t1;
 
170
#SHOW INDEX FROM t1;
171
171
CHECK TABLES t1;
172
172
 
173
173
# Test RENAME
201
201
 
202
202
create TEMPORARY table t1 (a int, b int, c int, d int, e int, f int, g int, h int,i int, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM;
203
203
insert into t1 (a,b,c,d,e,f,g,h,i) values(1,1,1,1,1,1,1,1,1);
204
 
--replace_column 3 X 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
 
204
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
205
205
show table status like 't1';
206
206
alter table t1 modify a int;
207
 
--replace_column 3 X 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
 
207
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
208
208
show table status like 't1';
209
209
drop table t1;
210
210
create TEMPORARY table t1 (a int not null default 0, b int not null default 0, c int not null default 0, d int not null default 0, e int not null default 0, f int not null default 0, g int not null default 0, h int not null default 0,i int not null default 0, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM;
211
211
insert into t1 (a) values(1);
212
 
--replace_column 3 X 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
 
212
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
213
213
show table status like 't1';
214
214
drop table t1;
215
215