Bug #17221 CREATE table with partitons allows for multiple 'engine=' clauses
Submitted: 8 Feb 2006 2:43 Modified: 31 Mar 2006 5:58
Reporter: Omer Barnir (OCA) Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.1 OS:Any (All)
Assigned to: Reggie Burnett CPU Architecture:Any

[8 Feb 2006 2:43] Omer Barnir
Description:
This bug is related to bug http://bugs.mysql.com/bug.php?id=16775 and is logged in order to emphasize the syntax issue

Currently one can create a table and specify different engines (engine=) for the table, the partitions and the sub-partitions. As mentioned in http://bugs.mysql.com/bug.php?id=16775 this can lead to crashes when alter comands are issued for the table, however the CREATE command with such syntax should fail and not be allowed in the first place.

How to repeat:
Log into the clinet and create a table such as:
CREATE TABLE  t3 ( f_int1 int(11) default NULL )  ENGINE = MEMORY
DEFAULT CHARSET=latin1
PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1)
(PARTITION part1 VALUES LESS THAN (1000)
                  (SUBPARTITION subpart11  ENGINE = MEMORY ));

Suggested fix:
Only one ' engine=' clause should be allowed.

If not specified, the table all its partitions and sub partitions should be created with the systems default engine

If specified, the table all its partitions and sub partitions should be created with this engine.
[31 Mar 2006 5:58] Reggie Burnett
We want to allow multiple engine clauses since we do plan to support heterogeneous partitioning in a future release (6.0?).  Currently we issue an error if a heterogeneous mix of engines is given.