Error
Error Code: 1855

MariaDB Error 1855: FTS_DOC_ID Replacement Issue

📦 MariaDB
📋

Description

This error occurs when attempting to modify a table that utilizes Full-Text Search (FTS) in MariaDB. Specifically, it signifies an operation trying to replace the internally managed, hidden `FTS_DOC_ID` column with a user-defined column, which is strictly prohibited. MariaDB uses `FTS_DOC_ID` to uniquely identify documents within a full-text index, and it must remain hidden and system-managed.
💬

Error Message

Cannot replace hidden FTS_DOC_ID with a user-visible one
🔍

Known Causes

4 known causes
⚠️
Attempting to Redefine FTS_DOC_ID
This error can occur if you try to add a new column named `FTS_DOC_ID` or modify an existing column to serve a similar purpose on a table that already has a full-text index defined.
⚠️
Invalid ALTER TABLE Statement
An `ALTER TABLE` statement might be attempting an operation (e.g., `RENAME COLUMN`, `CHANGE COLUMN`) that inadvertently targets or conflicts with the internal `FTS_DOC_ID` column, which is not user-modifiable.
⚠️
Schema Migration Conflict
Automated schema migration tools or scripts might generate `ALTER TABLE` statements that, due to their logic, conflict with MariaDB's internal FTS requirements, leading to this error during execution.
⚠️
Misunderstanding FTS Internals
Users might not be aware that `FTS_DOC_ID` is an internal, system-managed column created for full-text indexes and should not be directly manipulated or replaced by user-defined columns.
🛠️

Solutions

Coming Soon

Detailed step-by-step solutions for this error are being prepared. In the meantime, try these general troubleshooting tips:

General Troubleshooting Tips

  • Check the error message carefully for specific details
  • Review recent changes that might have caused the error
  • Search for the exact error code in the official documentation
  • Check log files for additional context
  • Try restarting the application or service
🔗

Related Errors

5 related errors