3360
MariaDBERRORNotableDDL / IndexesHIGH confidence

Functional index not applicable

Production Risk

Low — DDL fails; no data is altered.

How to reproduce
trigger — this will error
trigger — this will error
-- Creating a functional index on an incompatible expression.

expected output

ERROR 3360 (HY000): Functional index on a column is not applicable.

Fix

Use compatible expression

Use compatible expression
CREATE INDEX idx ON t ((CAST(col AS CHAR)));

Why this works

Ensure the functional expression is supported for the target column type.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 3360 ER_FUNCTIONAL_INDEX_NOT_APPLICABLE

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

← All MariaDB errors