Common SQL Errors

MySQL Error 1857: ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FTS - How to Fix and Prevent

Galaxy Team
August 7, 2025

<p>MySQL refuses an online ALTER TABLE because full-text indexes require a blocking table lock.</p>

Sign up for the latest in common SQL errors from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

What is MySQL error 1857 (ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FTS)?

<p>MySQL Error 1857: ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FTS means the requested ALTER TABLE cannot run online when a fulltext index is present. Use ALGORITHM=COPY, drop and recreate the full-text index, or run the statement during a maintenance window to fix the issue.</p>

Error Highlights

Typical Error Message

Fulltext index creation requires a lock

Error Type

DDL Error

Language

MySQL

Symbol

ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FTS

Error Code

1857

SQL State

HY000

Explanation

Table of Contents

What does MySQL Error 1857 mean?

Error 1857 appears when an ALTER TABLE uses ALGORITHM=INPLACE or ONLINE but the target table has a fulltext index. MySQL can only build or modify FULLTEXT indexes with a blocking metadata lock, so the operation is rejected.

The error was introduced in MySQL 5.7.1 to make the limitation explicit. Earlier versions silently fell back to a table copy, sometimes leading to long unexpected outages.

Why is a full lock required for FULLTEXT indexes?

FULLTEXT indexes rely on external auxiliary tables to store tokenized data. Updating those structures in place is not yet supported by the InnoDB online DDL engine. MySQL therefore takes a shared-nothing approach and insists on a table-level lock.

When does the error typically surface?

Most engineers hit 1857 while adding a column or changing the storage engine with ALGORITHM=INPLACE or with pt-online-schema-change. CI pipelines that default to ONLINE DDL can also fail unexpectedly in production deployments.

Is the data at risk?

The error blocks the statement before any changes occur, so data integrity is preserved. Application downtime can still happen if the failing migration runs during peak traffic.

Common Causes

Attempting INPLACE Alter With Fulltext Index

Running ALTER TABLE ... ALGORITHM=INPLACE on a table that already owns a FULLTEXT index is the most frequent trigger.

Creating a FULLTEXT Index Online

Building a new FULLTEXT KEY with ALGORITHM=INPLACE fails because the index creation itself needs an exclusive lock.

Third-Party Online Schema Tools

Tools such as gh-ost or pt-online-schema-change request ONLINE DDL by default and therefore hit the limitation unless configured to copy the table.

Framework Migrations With ONLINE Clause

Rails, Django, and other ORMs may append ALGORITHM=INPLACE in generated migrations, exposing the project to this error during deploys.

Related Errors

MySQL Error 1846: ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_NOT_NULL

Fails an INPLACE alter when a column without a default is added - similar online DDL limitation.

MySQL Error 1847: ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_AUTO_INCREMENT

Triggered when altering a table with an AUTO_INCREMENT column via ONLINE algorithm.

MySQL Error 1849: ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_RENAME

Appears when renaming a foreign key constraint using ALGORITHM=INPLACE.

MySQL Error 1833: ER_LOCK_OR_ACTIVE_TRANSACTION

Occurs when a metadata lock prevents DDL from proceeding; may surface alongside 1857 if concurrent sessions hold locks.

FAQs

Can I safely ignore Error 1857?

You should not ignore it because the ALTER statement will not run. Choose a supported algorithm instead.

Does ALGORITHM=COPY always fix the problem?

Yes, but it requires a full table copy and an exclusive lock, so plan for extra time and space.

Will upgrading MySQL remove the limitation?

No current MySQL version supports online FULLTEXT index creation for InnoDB. Monitor future release notes for changes.

How does Galaxy help?

Galaxy surfaces DDL execution plans and warns when ONLINE DDL is impossible, letting teams adjust scripts before deployment.

Start Querying with the Modern SQL Editor Today!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Check out some other errors

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo