~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/alter_table.test

  • Committer: Brian Aker
  • Date: 2009-05-15 17:06:35 UTC
  • mto: This revision was merged to the branch mainline in revision 1023.
  • Revision ID: brian@gaz-20090515170635-croy1u63a3gqdn9n
Dead convert functions for character sets.

Show diffs side-by-side

added added

removed removed

Lines of Context:
250
250
# not null columns for primary keys)
251
251
 
252
252
create 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;
253
 
insert into t1 (a) values(1);
254
 
--replace_column 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
 
253
insert into t1 (a,b,c,d,e,f,g,h,i) values(1,1,1,1,1,1,1,1,1);
 
254
--replace_column 3 X 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
255
255
show table status like 't1';
256
256
alter table t1 modify a int;
257
 
--replace_column 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
 
257
--replace_column 3 X 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
258
258
show table status like 't1';
259
259
drop table t1;
260
260
create 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;
261
261
insert into t1 (a) values(1);
262
 
--replace_column 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
 
262
--replace_column 3 X 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
263
263
show table status like 't1';
264
264
drop table t1;
265
265
 
269
269
 
270
270
CREATE TABLE t1 (a int PRIMARY KEY, b INT UNIQUE);
271
271
ALTER TABLE t1 DROP PRIMARY KEY;
 
272
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
272
273
SHOW CREATE TABLE t1;
273
274
--error ER_CANT_DROP_FIELD_OR_KEY
274
275
ALTER TABLE t1 DROP PRIMARY KEY;
437
438
#
438
439
CREATE TABLE t1(a INT) ROW_FORMAT=FIXED;
439
440
CREATE INDEX i1 ON t1(a);
 
441
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
440
442
SHOW CREATE TABLE t1;
441
443
DROP INDEX i1 ON t1;
 
444
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
442
445
SHOW CREATE TABLE t1;
443
446
DROP TABLE t1;
444
447
 
723
726
CREATE TEMPORARY TABLE `tt+1` (c1 INT);
724
727
--error ER_TABLE_EXISTS_ERROR
725
728
ALTER TABLE  `tt+1` RENAME `tt+2`;
 
729
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
726
730
SHOW CREATE TABLE `tt+1`;
 
731
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
727
732
SHOW CREATE TABLE `tt+2`;
728
733
DROP TABLE   `tt+1`, `tt+2`;
729
734
##
750
755
SHOW TABLES;
751
756
INSERT INTO `#sql2`      VALUES (1);
752
757
INSERT INTO `@0023sql1`  VALUES (2);
 
758
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
753
759
SHOW CREATE TABLE `#sql2`;
 
760
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
754
761
SHOW CREATE TABLE `@0023sql1`;
755
762
DROP TABLE `#sql2`, `@0023sql1`;
756
763
 
757
764
#
 
765
#
758
766
# Bug #22369: Alter table rename combined with other alterations causes lost tables
759
767
#
760
768
# This problem happens if the data change is compatible.