3370
MySQLERRORNotableInnoDB / TablespacesHIGH confidence
Table does not belong to the specified tablespace
Production Risk
Low — DDL fails; no data is moved.
How to reproduce
trigger — this will error
trigger — this will error
ALTER TABLE t TABLESPACE wrong_ts;
expected output
ERROR 3370 (HY000): Table does not reside in the given tablespace.
Fix
Verify tablespace with INFORMATION_SCHEMA
Verify tablespace with INFORMATION_SCHEMA
SELECT TABLE_NAME, TABLESPACE_NAME FROM INFORMATION_SCHEMA.INNODB_TABLES WHERE TABLE_NAME = 't';
Why this works
Confirms the actual tablespace name before issuing the ALTER TABLE.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 3370 ER_TABLE_NOT_IN_TABLE_SPACE
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev