1933
MariaDBERRORNotableDDLHIGH confidence
Incorrect type value for column
Production Risk
Low — DDL is rejected; no runtime impact.
What this means
A value in a PARTITION BY RANGE COLUMNS or LIST COLUMNS definition has a data type that is incompatible with the column's declared type.
Why it happens
- 1Using a string value as a partition bound for an integer column in RANGE COLUMNS.
- 2Mismatch between partition bound literal type and the partitioning column type.
How to reproduce
trigger — this will error
trigger — this will error
CREATE TABLE t (id INT) PARTITION BY RANGE COLUMNS(id) (PARTITION p0 VALUES LESS THAN ('abc'));expected output
ERROR 1933 (HY000): Incorrect type value for column 'id' in partition function.
Fix
Use a literal that matches the column data type
Use a literal that matches the column data type
CREATE TABLE t (id INT) PARTITION BY RANGE COLUMNS(id) (PARTITION p0 VALUES LESS THAN (100));
Why this works
Partition bounds must be type-compatible with the partitioning column.
Sources
Official documentation ↗
MySQL 8.0 — 1933 ER_WRONG_TYPE_COLUMN_VALUE_ERROR2
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev