1565
MySQLERRORNotablePartitioningHIGH confidence
Partition constant domain error
Production Risk
Low — the DDL fails; no table is created.
What this means
A partition LESS THAN value is outside the domain of the partition function.
Why it happens
- 1A RANGE partition uses a constant that overflows or is outside the valid range of the partition function return type.
How to reproduce
trigger — this will error
trigger — this will error
CREATE TABLE t (id TINYINT) PARTITION BY RANGE(id) ( PARTITION p0 VALUES LESS THAN (300) );
expected output
ERROR 1565 (HY000): Partition constant is out of partition function domain
Fix
Use a value within the column type domain
Use a value within the column type domain
CREATE TABLE t (id TINYINT) PARTITION BY RANGE(id) ( PARTITION p0 VALUES LESS THAN (127) );
Why this works
Partition boundary values must fit within the range of the partitioning column data type.
Sources
Official documentation ↗
MySQL 8.0 — 1565 ER_PARTITION_CONST_DOMAIN_ERROR
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev