Description:
CSV, Memory, and MyISAM do not support partitioning, but when using these three storage engines to create a partitioned table, an inconsistent error message appears. The error messages for Memory and MyISAM are the same, while the error messages for CSV are different from the other two.
How to repeat:
CREATE TABLE Sales (
id INT PRIMARY KEY,
sales_date DATE,
amount DECIMAL(10, 2)
) engine=csv
PARTITION BY RANGE (YEAR(sales_date)) (
PARTITION p0 VALUES LESS THAN (1990),
PARTITION p1 VALUES LESS THAN (2000),
PARTITION p2 VALUES LESS THAN (2010),
PARTITION p3 VALUES LESS THAN MAXVALUE
);
> ERROR 1572 (HY000): Engine cannot be used in partitioned tables
CREATE TABLE Sales (
id INT PRIMARY KEY,
sales_date DATE,
amount DECIMAL(10, 2)
) engine=memory
PARTITION BY RANGE (YEAR(sales_date)) (
PARTITION p0 VALUES LESS THAN (1990),
PARTITION p1 VALUES LESS THAN (2000),
PARTITION p2 VALUES LESS THAN (2010),
PARTITION p3 VALUES LESS THAN MAXVALUE
);
> ERROR 1178 (42000): The storage engine for the table doesn't support native partitioning
CREATE TABLE Sales (
id INT PRIMARY KEY,
sales_date DATE,
amount DECIMAL(10, 2)
) engine=MyISAM
PARTITION BY RANGE (YEAR(sales_date)) (
PARTITION p0 VALUES LESS THAN (1990),
PARTITION p1 VALUES LESS THAN (2000),
PARTITION p2 VALUES LESS THAN (2010),
PARTITION p3 VALUES LESS THAN MAXVALUE
);
> ERROR 1178 (42000): The storage engine for the table doesn't support native partitioning