3415
MariaDBERRORNotablePartitioningHIGH confidence

Partition pruning not applicable for subpartitions

Production Risk

Low — query fails; no data is returned.

How to reproduce
trigger — this will error
trigger — this will error
SELECT * FROM t PARTITION (sp0);

expected output

ERROR 3415 (HY000): Partition pruning is not applicable for subpartitions.

Fix

Select top-level partition instead

Select top-level partition instead
SELECT * FROM t PARTITION (p0);

Why this works

Top-level partition selection is supported; subpartition direct selection requires the composite partition@subpartition syntax.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 3415 ER_PARTITION_PRUNING_NOT_APPLICABLE_FOR_SUBPARTITIONS

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MariaDB errors