1664
MySQLERRORNotableSchemaHIGH confidence
Unknown ALTER TABLE ALGORITHM value
Production Risk
Low — the ALTER is rejected; no data change.
What this means
The ALGORITHM clause in an ALTER TABLE statement specifies an unrecognised algorithm name.
Why it happens
- 1A typo or unsupported value was used in ALGORITHM=.
How to reproduce
trigger — this will error
trigger — this will error
ALTER TABLE t ADD COLUMN x INT, ALGORITHM=FASTCOPY;
expected output
ERROR 1664 (HY000): Unknown ALGORITHM 'FASTCOPY'.
Fix
Use a valid ALGORITHM value
Use a valid ALGORITHM value
ALTER TABLE t ADD COLUMN x INT, ALGORITHM=INPLACE; -- Valid values: DEFAULT, INPLACE, COPY, INSTANT (MySQL 8.0+)
Why this works
Specifying a supported algorithm name resolves the parse error.
Version notes
Sources
Official documentation ↗
MySQL 8.0 — 1664 ER_UNKNOWN_ALTER_ALGORITHM
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev