Error
Error Code:
1566
MySQL Error 1566: NULL in Partition Range
Description
This error occurs when you attempt to use a `NULL` value within the `VALUES LESS THAN` clause of a `RANGE` partitioned table definition. MySQL's `RANGE` partitioning scheme requires explicit, non-NULL boundary values for its partitions.
Error Message
Not allowed to use NULL value in VALUES LESS THAN
Known Causes
3 known causesInvalid Partition Boundary
You attempted to specify `NULL` as a boundary value in a `VALUES LESS THAN` clause when creating or altering a `RANGE` partitioned table.
Misconfigured RANGE Partitioning
MySQL's `RANGE` partitioning is designed to work with explicit, ordered, non-NULL values to define partition boundaries, and `NULL` is not permitted.
Incorrect Schema Adaptation
A partitioning scheme that might handle `NULL` in other contexts (e.g., `LIST` partitioning) was mistakenly applied or adapted for `RANGE` partitioning.
Solutions
Coming SoonGeneral Troubleshooting Tips
- Check the error message carefully for specific details
- Review recent changes that might have caused the error
- Search for the exact error code in the official documentation
- Check log files for additional context
- Try restarting the application or service