diff options
author | mattiasj@client-10-129-10-137.upp.off.mysql.com <> | 2008-01-09 13:15:50 +0100 |
---|---|---|
committer | mattiasj@client-10-129-10-137.upp.off.mysql.com <> | 2008-01-09 13:15:50 +0100 |
commit | a6a9774849acafd54b4e625da444697ac76af2f0 (patch) | |
tree | 01efa133afaebe5223ea778383087a1375e03273 /mysql-test/r/partition_innodb.result | |
parent | 6836db1cee363a47a0fd2423307e60fe7ecfedd4 (diff) | |
download | mariadb-git-a6a9774849acafd54b4e625da444697ac76af2f0.tar.gz |
Bug#31931 Partitions: unjustified 'mix of handlers' error message
Problem was that the mix of handlers was not consistent between
CREATE and ALTER
changed so that it works like:
- All partitions must use the same engine
AND it must be the same as the table.
- if one does NOT specify an engine on the table level
then one must either NOT specify any engine on any
partition/subpartition OR for ALL partitions/subpartitions
Note: that after a table have been created, the storage engine
is specified for all parts of the table (table/partition/subpartition)
and so when using alter, one does not need to specify it (unless one
wants to change the storage engine, then one have to specify it on the
table level)
Diffstat (limited to 'mysql-test/r/partition_innodb.result')
-rw-r--r-- | mysql-test/r/partition_innodb.result | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result index 5cbe34c94ca..ac9b548b19e 100644 --- a/mysql-test/r/partition_innodb.result +++ b/mysql-test/r/partition_innodb.result @@ -79,8 +79,7 @@ engine = innodb partition by list (a) (partition p0 values in (0)); alter table t1 engine = x; -Warnings: -Warning 1286 Unknown table engine 'x' +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -151,9 +150,11 @@ DROP TABLE t1; create table t1 (int_column int, char_column char(5)) PARTITION BY RANGE (int_column) subpartition by key (char_column) subpartitions 2 (PARTITION p1 VALUES LESS THAN (5) ENGINE = InnoDB); -alter table t1 PARTITION BY RANGE (int_column) +alter table t1 +ENGINE = MyISAM +PARTITION BY RANGE (int_column) subpartition by key (char_column) subpartitions 2 -(PARTITION p1 VALUES LESS THAN (5) ENGINE = myisam); +(PARTITION p1 VALUES LESS THAN (5)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( |