3651
MySQLERRORNotableInnoDBHIGH confidence
InnoDB undo tablespace is not empty
Production Risk
Medium — DROP fails; undo tablespace management is disrupted.
How to reproduce
trigger — this will error
trigger — this will error
DROP UNDO TABLESPACE innodb_undo_002;
expected output
ERROR 3651 (HY000): InnoDB undo tablespace 'innodb_undo_002' is not empty.
Fix
Deactivate and wait before dropping
Deactivate and wait before dropping
ALTER UNDO TABLESPACE innodb_undo_002 SET INACTIVE; -- Wait for state = 'empty' in information_schema.INNODB_TABLESPACES SELECT NAME, STATE FROM information_schema.INNODB_TABLESPACES WHERE NAME = 'innodb_undo_002'; DROP UNDO TABLESPACE innodb_undo_002;
Why this works
Marks the tablespace inactive, allowing InnoDB to purge before dropping.
What not to do
✕
Version notes
Sources
Official documentation ↗
MySQL 8.0 — 3651 ER_INNODB_UNDO_TABLESPACE_NOT_EMPTY
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev