Bug #113300 Inconsistent error message when create table using partition
Submitted: 1 Dec 2023 6:37 Modified: 1 Dec 2023 11:46
Reporter: HE Y Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Storage Engines Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[1 Dec 2023 6:37] HE Y
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
[1 Dec 2023 11:46] MySQL Verification Team
Hi Mr. Y,

Thank you for your bug report.

We have managed to repeat your test results.

We must inform you that this is a. very low priority bug, but it is still a verified report.