1751
MariaDBWARNINGNotableTransactionsHIGH confidence
Incomplete rollback — created temporary table not rolled back
Production Risk
Low — warning only; temporary table remains in session.
What this means
A transaction that created a temporary table was rolled back, but temporary table creation is a non-transactional DDL and cannot be undone; the temporary table still exists.
Why it happens
- 1CREATE TEMPORARY TABLE executed inside a transaction that was subsequently rolled back.
How to reproduce
trigger — this will error
trigger — this will error
START TRANSACTION; CREATE TEMPORARY TABLE tmp_work (id INT); ROLLBACK; -- tmp_work still exists
expected output
Warning (Code 1751): Some temporary tables were created in a transaction that rolled back.
Fix
Drop the temporary table explicitly after a rollback if it is no longer needed
Drop the temporary table explicitly after a rollback if it is no longer needed
DROP TEMPORARY TABLE IF EXISTS tmp_work;
Why this works
Manually cleans up the temporary table that the ROLLBACK could not remove.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 1751 ER_WARNING_NOT_COMPLETE_ROLLBACK_WITH_CREATED_TEMP_TABLE
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev