Error
Error Code:
1178
MariaDB Error 1178: Unsupported Table Feature
Description
This error indicates that the storage engine chosen for a table does not support a specific feature or constraint defined within that table. It commonly occurs during `CREATE TABLE` or `ALTER TABLE` operations when a feature like a `CHECK` constraint or a particular index type is incompatible with the selected engine (e.g., MyISAM, InnoDB).
Error Message
The storage engine for the table doesn't support %s
Known Causes
3 known causesUnsupported `CHECK` Constraint
The table definition includes a `CHECK` constraint, which may not be supported by the selected storage engine (e.g., older InnoDB versions) or the current MariaDB server version.
Engine Lacks Specific Feature
The chosen storage engine (e.g., MyISAM) does not support a specific feature such as `FOREIGN KEY` constraints, `FULLTEXT` indexes, or spatial data types defined in the table.
MariaDB Version Incompatibility
Attempting to use a database feature that is only available in a newer MariaDB server version or a specific configuration of the storage engine than what is currently installed.
Solutions
3 solutions available1. Convert Table to InnoDB medium
Migrates the table to the InnoDB storage engine, which supports a wider range of features.
1
Identify the table causing the error and its current storage engine.
SHOW CREATE TABLE your_table_name;
2
If the table is not using InnoDB, convert it by altering the table definition.
ALTER TABLE your_table_name ENGINE=InnoDB;
3
Verify the storage engine has been changed.
SHOW CREATE TABLE your_table_name;
2. Remove Unsupported Feature medium
Modifies the table definition to exclude the feature not supported by the current storage engine.
1
Determine the specific unsupported feature mentioned in the error message (e.g., 'FULLTEXT index', 'SPATIAL index', 'CHECK constraints').
Observe the '%s' placeholder in the error message: MariaDB Error 1178: The storage engine for the table doesn't support %s
2
If the unsupported feature is an index, you can remove it. For example, to remove a FULLTEXT index:
ALTER TABLE your_table_name DROP INDEX index_name;
3
If it's a constraint (like CHECK), you might need to drop it. Note: Older versions of MariaDB might not support CHECK constraints in all engines.
ALTER TABLE your_table_name DROP CHECK constraint_name;
4
Re-create the table or modify it without the unsupported feature. For example, if creating a new table, omit the unsupported clause.
CREATE TABLE your_table_name (
id INT PRIMARY KEY,
data VARCHAR(255)
) ENGINE=your_current_engine_name;
3. Upgrade MariaDB Version advanced
Updates MariaDB to a newer version that might offer broader support for table features.
1
Check your current MariaDB version.
SELECT VERSION();
2
Research the release notes for recent MariaDB versions to see if the unsupported feature has been added or improved for your current storage engine.
Visit the official MariaDB documentation website.
3
Plan and execute a MariaDB upgrade according to the official documentation. This typically involves backing up your data, stopping the MariaDB service, installing the new version, and running the mysql_upgrade utility.
sudo systemctl stop mariadb
# Follow upgrade instructions for your OS (e.g., apt, yum)
mysql_upgrade -u root -p
4
After the upgrade, test the table creation or operation that previously failed.
Attempt the operation that caused Error 1178.