diff options
-rw-r--r-- | mysql-test/r/partition.result | 14 | ||||
-rw-r--r-- | mysql-test/r/partition_innodb.result | 12 | ||||
-rw-r--r-- | mysql-test/t/partition.test | 11 | ||||
-rw-r--r-- | mysql-test/t/partition_innodb.test | 11 |
4 files changed, 23 insertions, 25 deletions
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index e39e84fdd69..4e4bd0bbc0a 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1291,18 +1291,4 @@ t1 CREATE TABLE `t1` ( `b` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (b) (PARTITION p1 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION p2 VALUES LESS THAN (20) ENGINE = MyISAM) */ drop table t1, t2; -create table t1 (int_column int, char_column char(5)) -PARTITION BY RANGE (int_column) subpartition by key (char_column) -(PARTITION p1 VALUES LESS THAN (5) ENGINE = InnoDB); -Warnings: -Warning 1286 Unknown table engine 'InnoDB' -alter table t1 PARTITION BY RANGE (int_column) subpartition by key (char_column) -(PARTITION p1 VALUES LESS THAN (5) ENGINE = myisam); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `int_column` int(11) DEFAULT NULL, - `char_column` char(5) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (int_column) SUBPARTITION BY KEY (char_column) (PARTITION p1 VALUES LESS THAN (5) ENGINE = MyISAM) */ -drop table t1; End of 5.1 tests diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result index 5b755b6bfd5..e007c8f3e96 100644 --- a/mysql-test/r/partition_innodb.result +++ b/mysql-test/r/partition_innodb.result @@ -136,3 +136,15 @@ SELECT COUNT(*) FROM t1; COUNT(*) 2 DROP TABLE t1; +create table t1 (int_column int, char_column char(5)) +PARTITION BY RANGE (int_column) subpartition by key (char_column) +(PARTITION p1 VALUES LESS THAN (5) ENGINE = InnoDB); +alter table t1 PARTITION BY RANGE (int_column) subpartition by key (char_column) +(PARTITION p1 VALUES LESS THAN (5) ENGINE = myisam); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `int_column` int(11) DEFAULT NULL, + `char_column` char(5) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (int_column) SUBPARTITION BY KEY (char_column) (PARTITION p1 VALUES LESS THAN (5) ENGINE = MyISAM) */ +drop table t1; diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 82a8759e910..2906b4640cd 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -1528,15 +1528,4 @@ PARTITION BY RANGE (b) ( show create table t1; drop table t1, t2; -# -# Bug #31893 Partitions: crash if subpartitions and engine change -# -create table t1 (int_column int, char_column char(5)) - PARTITION BY RANGE (int_column) subpartition by key (char_column) - (PARTITION p1 VALUES LESS THAN (5) ENGINE = InnoDB); -alter table t1 PARTITION BY RANGE (int_column) subpartition by key (char_column) - (PARTITION p1 VALUES LESS THAN (5) ENGINE = myisam); -show create table t1; -drop table t1; - --echo End of 5.1 tests diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test index 4a50332b3df..0f20b34c7dc 100644 --- a/mysql-test/t/partition_innodb.test +++ b/mysql-test/t/partition_innodb.test @@ -142,3 +142,14 @@ PARTITION BY KEY(a) PARTITIONS 10; INSERT INTO t1 VALUES(1),(2); SELECT COUNT(*) FROM t1; DROP TABLE t1; + +# +# Bug #31893 Partitions: crash if subpartitions and engine change +# +create table t1 (int_column int, char_column char(5)) + PARTITION BY RANGE (int_column) subpartition by key (char_column) + (PARTITION p1 VALUES LESS THAN (5) ENGINE = InnoDB); +alter table t1 PARTITION BY RANGE (int_column) subpartition by key (char_column) + (PARTITION p1 VALUES LESS THAN (5) ENGINE = myisam); +show create table t1; +drop table t1; |