3398
MariaDBERRORCommonInnoDB / TablespacesHIGH confidence
Tablespace is missing (alternate error path)
Production Risk
Critical — affected tables are inaccessible until tablespace is restored.
How to reproduce
trigger — this will error
trigger — this will error
ALTER TABLE t ADD COLUMN c INT;
expected output
ERROR 3398 (HY000): Tablespace is missing for table.
Fix
Restore tablespace from backup
Restore tablespace from backup
-- Copy the .ibd file from backup to the datadir, then: ALTER TABLE t IMPORT TABLESPACE;
Why this works
Restoring the physical file resolves the missing tablespace reference in the data dictionary.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 3398 ER_TABLESPACE_MISSING_WITH_NAME2
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev