1719
MySQLERRORCommonInnoDBHIGH confidence
InnoDB undo log is full; cannot rollback the transaction
Production Risk
High — transaction fails and must be rolled back; undo log needs manual management.
What this means
The InnoDB undo log tablespace has been exhausted. Long-running transactions that generate large undo entries eventually fill the undo log.
Why it happens
- 1Very large or long-running transaction.
- 2Undo tablespace is too small relative to transaction volume.
- 3innodb_undo_log_truncate is disabled.
How to reproduce
trigger — this will error
trigger — this will error
-- Long transaction updating millions of rows without committing.
expected output
ERROR 1719 (HY000): Undo log is full; cannot execute DML.
Fix 1
Break large transactions into smaller batches
Break large transactions into smaller batches
-- Instead of one large UPDATE: UPDATE large_table SET col = val WHERE id BETWEEN 1 AND 10000; COMMIT; UPDATE large_table SET col = val WHERE id BETWEEN 10001 AND 20000; COMMIT;
Why this works
Committing frequently reduces the undo log footprint per transaction.
Fix 2
Enable undo log truncation
Enable undo log truncation
SET GLOBAL innodb_undo_log_truncate = ON; SET GLOBAL innodb_purge_rseg_truncate_frequency = 128;
Why this works
Truncation allows InnoDB to reclaim undo tablespace after purge.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 1719 ER_INNODB_UNDO_LOG_FULL
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev