~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/alter_table.test

  • Committer: Vladimir Kolesnikov
  • Date: 2009-03-25 09:18:25 UTC
  • mto: (968.2.17 mordred)
  • mto: This revision was merged to the branch mainline in revision 971.
  • Revision ID: vladimir@primebase.org-20090325091825-gnw5opo5xtprd6k0
test generalizations

Show diffs side-by-side

added added

removed removed

Lines of Context:
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.