diff options
author | mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se <> | 2006-06-13 22:46:38 -0400 |
---|---|---|
committer | mikael@c-0409e253.1238-1-64736c10.cust.bredbandsbolaget.se <> | 2006-06-13 22:46:38 -0400 |
commit | 975e14e40d98600f65a55087fbdae05a5c9e3aae (patch) | |
tree | 33c9c4231ce76399f9bd76b20aff2f100dffb361 /mysql-test | |
parent | d2b04770ac35f5b11684dfd8444129aacbd17f26 (diff) | |
download | mariadb-git-975e14e40d98600f65a55087fbdae05a5c9e3aae.tar.gz |
BUG#20397: Crash at ALTER TABLE t1 engine = x; for partitioned table
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/partition_error.result | 24 | ||||
-rw-r--r-- | mysql-test/t/partition_error.test | 20 |
2 files changed, 44 insertions, 0 deletions
diff --git a/mysql-test/r/partition_error.result b/mysql-test/r/partition_error.result index a7ca3d9b2fa..a4866209ee6 100644 --- a/mysql-test/r/partition_error.result +++ b/mysql-test/r/partition_error.result @@ -1,4 +1,28 @@ drop table if exists t1; +create table t1 (a int) +engine = x +partition by key (a); +Warnings: +Error 1286 Unknown table engine 'x' +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY (a) +drop table t1; +create table t1 (a int) +engine = innodb +partition by list (a) +(partition p0 values in (0)); +alter table t1 engine = x; +Warnings: +Error 1286 Unknown table engine 'x' +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0) ENGINE = InnoDB) +drop table t1; partition by list (a) partitions 3 (partition x1 values in (1,2,9,4) tablespace ts1, diff --git a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test index 659f0b8cef4..39fde685bce 100644 --- a/mysql-test/t/partition_error.test +++ b/mysql-test/t/partition_error.test @@ -9,6 +9,24 @@ drop table if exists t1; --enable_warnings # +# Bug 20397: Partitions: Crash when using non-existing engine +# +create table t1 (a int) +engine = x +partition by key (a); +show create table t1; +drop table t1; + +create table t1 (a int) +engine = innodb +partition by list (a) +(partition p0 values in (0)); + +alter table t1 engine = x; +show create table t1; +drop table t1; + +# # Partition by key stand-alone error # --error 1064 @@ -775,3 +793,5 @@ partition by range (a + (select count(*) from t1)) -- error ER_PARTITION_FUNC_NOT_ALLOWED_ERROR create table t1 (a char(10)) partition by hash (extractvalue(a,'a')); + + |