<p>Occurs when a table definition combines RANGE or LIST partitions with HASH or KEY subpartitions, which MySQL does not allow.</p>
<p>MySQL Error 1500: ER_SUBPARTITION_ERROR means the table definition mixes incompatible partition methods. Keep the same method for both partitions and subpartitions or remove subpartitioning to fix the problem.</p>
It is only possible to mix RANGE/LIST partitioning with
MySQL raises error 1500 when a CREATE TABLE or ALTER TABLE statement tries to combine RANGE or LIST partitioning with HASH or KEY subpartitioning, or the other way around. The parser stops at compile time and rejects the statement.
The message 'It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning' clarifies that the mix is unsupported. Fixing the definition allows the table to be created or altered successfully.
The root cause is an incompatible partition clause. MySQL supports RANGE or LIST on top and HASH or KEY below, but not vice versa. A mismatch triggers the error instantly before any data is written.
Version mismatches can also surface the error. Older 5.x releases are stricter, while 8.x still rejects the statement but adds clearer hints.
Rewrite the partition clause so that both levels use supported combinations. Either remove subpartitioning or switch to HASH or KEY at the top with no subpartitions. Always test the statement in a staging environment first.
After altering the definition, run EXPLAIN PARTITIONS to verify that MySQL accepts the new layout.
Developers often try to optimise query speed by adding HASH subpartitions to a RANGE partition. The fix is to convert the whole design to RANGE partitions only or place HASH at the top without subpartitions.
Importing DDL from another database engine can also cause the mistake. Adjust the DDL to match MySQL rules before import.
Plan the partition strategy in advance and keep a style guide that lists allowed combinations. Version control the DDL in a shared repository to enable peer review and automated linting.
Use a modern SQL editor like Galaxy to share endorsed partition templates so team members avoid unsupported mixes.
Error 1493 partition constant out of range appears when boundary values do not align with column types. Error 1517 duplicate partition name arises if two partitions share the same identifier. Fix each by correcting the DDL.
The most frequent cause is defining a RANGE partition for outer partitions and then adding HASH subpartitions.
A LIST outer partition with KEY subpartitions is not allowed and will trigger error 1500.
Placing HASH or KEY at the top and RANGE or LIST as subpartitions also fails.
Scripts written for Oracle or MariaDB may use partition mixes unsupported in MySQL.
Occurs when RANGE or LIST boundary values exceed the column data type.
Raised when two partitions share the same identifier in the DDL.
Appears during ALTER TABLE if an index required for referential integrity is removed.
Only when RANGE is the outer partition and HASH is the subpartition. The reverse is not supported.
No. The limitation is at the partition parser level and applies to all storage engines.
As of MySQL 8.1 the rule still applies. Monitor release notes but plan designs within current limits.
Galaxy lets teams store endorsed DDL snippets and offers AI linting that flags unsupported partition mixes before execution.