1779
MariaDBERRORNotableDDLHIGH confidence
ALTER TABLE operation not supported — specific reason
Production Risk
Medium — DDL blocked.
What this means
ALTER TABLE cannot use the specified algorithm/lock combination for this operation, and the error message includes the specific reason.
Why it happens
- 1The column or index change is incompatible with in-place or instant DDL.
- 2A foreign key change requires COPY algorithm.
How to reproduce
trigger — this will error
trigger — this will error
ALTER TABLE tbl ALGORITHM=INPLACE, ADD FOREIGN KEY (col) REFERENCES other(id); -- may require COPY
expected output
ERROR 1779 (0A000): ALTER TABLE ... ALGORITHM=INPLACE is not supported. Reason: ...
Fix
Switch to ALGORITHM=COPY or remove the ALGORITHM hint
Switch to ALGORITHM=COPY or remove the ALGORITHM hint
ALTER TABLE tbl ALGORITHM=COPY, ADD FOREIGN KEY (col) REFERENCES other(id);
Why this works
COPY algorithm supports all DDL operations.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 1779 ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev