1783
MariaDBERRORNotableDDLHIGH confidence

INPLACE ALTER not supported due to column type change

Production Risk

Medium — DDL blocked; COPY requires a table lock.

What this means

The ALTER TABLE operation changes a column's data type in a way that is incompatible with in-place execution.

Why it happens
  1. 1Changing a column from INT to BIGINT, or VARCHAR length changes beyond in-place limits.
How to reproduce
trigger — this will error
trigger — this will error
ALTER TABLE tbl ALGORITHM=INPLACE, MODIFY COLUMN description TEXT; -- was VARCHAR(255)

expected output

ERROR 1783 (0A000): ALGORITHM=INPLACE is not supported. Reason: Column type incompatible with INPLACE.

Fix

Use ALGORITHM=COPY for incompatible type changes

Use ALGORITHM=COPY for incompatible type changes
ALTER TABLE tbl ALGORITHM=COPY, MODIFY COLUMN description TEXT;

Why this works

Forces a full table rebuild that accommodates any column type change.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 1783 ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COLUMN_TYPE

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

← All MariaDB errors