Common SQL Errors

MySQL Error 1855: ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_HIDDEN_FTS - How to Fix and Prevent

Galaxy Team
August 7, 2025

<p>The error appears when an ALTER TABLE statement tries to expose or replace the hidden full-text column FTS_DOC_ID with a regular, user-visible column.</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 error code 1855?

<p>MySQL Error 1855 ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_HIDDEN_FTS occurs when ALTER TABLE touches the hidden FTS_DOC_ID column created by full-text indexes. Leave that column hidden or rebuild the full-text index to resolve the issue.</p>

Error Highlights

Typical Error Message

Cannot replace hidden FTS_DOC_ID with a user-visible one

Error Type

DDL Operation Error

Language

MySQL

Symbol

ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_HIDDEN_FTS

Error Code

1855

SQL State

HY000

Explanation

Table of Contents

What is MySQL Error 1855 ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_HIDDEN_FTS?

Error 1855 is raised by the MySQL server when an ALTER TABLE statement attempts to replace or expose the internal column FTS_DOC_ID that underpins InnoDB full-text search indexes. This helper column is generated automatically and must remain hidden.

The error was introduced in MySQL 5.7.1 as part of enhanced full-text search support. Any DDL that makes the column visible or overrides it with a user-defined name will fail with SQLSTATE HY000.

What Causes This Error?

MySQL triggers error 1855 when ALTER TABLE ADD COLUMN or CHANGE COLUMN references FTS_DOC_ID directly or implicitly via RENAME COLUMN. Because the column is flagged HIDDEN, the storage engine blocks visibility changes.

The same check fires when a CREATE TABLE ... LIKE or OPTIMIZE TABLE sequence tries to materialize the hidden column in the new definition.

How to Fix MySQL Error 1855

Remove FTS_DOC_ID from the ALTER statement. Instead, perform the desired schema change without touching the hidden column. If you need a user-visible document ID, add a new column with a different name and update your application logic.

When restructuring full-text indexes, drop the existing index, run the ALTER you need, and recreate the full-text index. This sequence lets MySQL regenerate FTS_DOC_ID safely.

Common Scenarios and Solutions

Developers often hit error 1855 during automated migrations that iterate through every column. Exclude FTS_DOC_ID from generation scripts to avoid failures.

Tools that clone tables with CREATE TABLE ... LIKE should use --skip-hidden-columns or equivalent logic to prevent hidden column leakage.

Best Practices to Avoid This Error

Never reference FTS_DOC_ID in DDL or SELECT lists. Treat it as an implementation detail managed by MySQL.

Use meaningful surrogate keys or PRIMARY KEY values for document IDs instead of relying on the internal column.

Related Errors and Solutions

Errors 1845 and 1846 also protect hidden full-text metadata columns. They surface when attempting to rename or change attributes of those columns. The fixes mirror those for error 1855 - leave hidden columns untouched.

Common Causes

Adding a User Column Named FTS_DOC_ID

Attempts to add a visible column with the same name collide with the hidden column.

Renaming the Hidden Column

Change or rename commands that target FTS_DOC_ID explicitly trigger the protection.

Table Cloning Utilities

CREATE TABLE ... LIKE inadvertently includes hidden columns unless filtered out.

Automated ORMs or Migration Generators

Code-first migration tools may iterate through information_schema and replicate all columns, including hidden ones.

Related Errors

MySQL Error 1845 ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_COLUMN_TYPE

Raised when attempting to change the data type of a hidden full-text column.

MySQL Error 1846 ER_ALTER_OPERATION_NOT_SUPPORTED_REASON_FK_COLUMN_TYPE

Occurs when hidden FTS columns conflict with foreign key alterations.

MySQL Error 1280 ER_ALTER_COLUMN_NAME_NOT_FOUND

Appears when ALTER TABLE references a non-existent column, often due to filtering out hidden columns incorrectly.

FAQs

Can I safely delete FTS_DOC_ID?

No. Dropping the column breaks the full-text index. Drop the index first, then MySQL will remove the column.

Is the error version-specific?

The check exists in MySQL 5.7.1 and higher, including all 8.x releases.

How does Galaxy help with this issue?

Galaxys schema-aware auto-complete hides FTS_DOC_ID, preventing accidental inclusion in generated ALTER statements.

Can I rename FTS_DOC_ID to something readable?

MySQL does not allow renaming. Add a separate visible column instead.

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