1499
MySQLERRORNotablePartitioningHIGH confidence
VALUES LESS THAN value must be strictly increasing for each partition
Production Risk
Low — DDL error; the table will not be created.
What this means
ER_RANGE_NOT_INCREASING_ERROR (1499, SQLSTATE HY000) is raised when RANGE partition VALUES LESS THAN values are not in strictly ascending order.
Why it happens
- 1Partition definitions out of order — a later partition has a LESS THAN value lower than a previous one
- 2Duplicate VALUES LESS THAN values across partitions
How to reproduce
trigger — this will error
trigger — this will error
CREATE TABLE t (id INT) PARTITION BY RANGE(id) ( PARTITION p0 VALUES LESS THAN (200), PARTITION p1 VALUES LESS THAN (100) -- 100 < 200, not increasing );
expected output
ERROR 1499 (HY000): VALUES LESS THAN value must be strictly increasing for each partition
Fix
Order partitions with strictly increasing VALUES LESS THAN
Order partitions with strictly increasing VALUES LESS THAN
CREATE TABLE t (id INT) PARTITION BY RANGE(id) ( PARTITION p0 VALUES LESS THAN (100), PARTITION p1 VALUES LESS THAN (200), PARTITION p2 VALUES LESS THAN MAXVALUE );
Why this works
RANGE partitions must be defined in ascending order of their boundary values.
Sources
Official documentation ↗
MySQL 8.0 — 1499 ER_RANGE_NOT_INCREASING_ERROR
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev