Common SQL Errors

MySQL Error 1622: ER_WARN_ENGINE_TRANSACTION_ROLLBACK - How to Fix and Prevent

Galaxy Team
August 7, 2025

<p>This warning occurs when a statement targets a storage engine that lacks rollback support, forcing MySQL to roll back the entire transaction.</p>

Sign up for the latest in common SQL errors from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

What is MySQL error 1622?

<p>MySQL Error 1622: ER_WARN_ENGINE_TRANSACTION_ROLLBACK warns that the storage engine used by your statement cannot roll back partial changes, so MySQL cancels the whole transaction. Switch to a transactional engine like InnoDB or redesign the statement to avoid cross-engine writes to resolve the issue.</p>

Error Highlights

Typical Error Message

Storage engine %s does not support rollback for this

Error Type

Transaction Error

Language

MySQL

Symbol

ER_WARN_ENGINE_TRANSACTION_ROLLBACK

Error Code

1622

SQL State

HY000

Explanation

Table of Contents

What is MySQL error 1622 (ER_WARN_ENGINE_TRANSACTION_ROLLBACK)?

Error 1622 fires when MySQL detects that your current statement touches a table handled by a non-transactional storage engine such as MyISAM or MEMORY while the session is inside a transaction. Because the engine cannot undo partial changes, MySQL rolls back the entire transaction and warns the client.

The full message is: "Storage engine %s does not support rollback for this statement. Transaction rolled back and must be restarted". Although flagged as a warning, the effect is critical: any work done in the transaction is lost and you must restart it.

When does this error show up?

Developers most often see it after converting only part of a schema to InnoDB or when mixing temporary MEMORY tables with transactional updates. It can also appear in replication if the replica relies on a different engine than the source.

Why is it important to fix quickly?

Silently losing a full unit of work can corrupt business logic, create data gaps, and break idempotent workflows. Automated jobs might keep retrying and overload your database. Eliminating the root cause preserves data integrity and performance.

What Causes This Error?

Using MyISAM tables inside START TRANSACTION is the leading trigger. The engine does not support ACID semantics, so MySQL rolls back.

Mixing transactional and non-transactional tables within a single DML statement (for example, an INSERT ... SELECT) is another common cause.

Creating or altering MEMORY tables during a transaction can produce the warning because MEMORY also lacks rollback capabilities.

How to Fix MySQL Error 1622

Identify every table touched by the failing statement and confirm its engine. Convert all critical tables to InnoDB or another transactional engine.

When conversion is not possible, split the workload: run statements against non-transactional tables outside any explicit transaction.

Ensure your ORM or application code does not wrap autocommit=1 statements in unnecessary BEGIN/COMMIT blocks.

Common Scenarios and Solutions

Bulk load from MyISAM to InnoDB: switch the source table to InnoDB or export data to a staging area before loading.

INSERT INTO transactional_table SELECT * FROM memory_table: move data first into a temporary InnoDB table, then insert.

Mixed‐engine replication lag: align engines between primary and replica to stop rollbacks on replicas.

Best Practices to Avoid This Error

Standardize on InnoDB for all production tables. Audit your schema periodically with SHOW TABLE STATUS to detect drift.

Enable the sql_notes parameter in Galaxy's editor to surface warnings instantly so you can react before code reaches production.

Use continuous integration scripts that block migrations introducing non-transactional engines.

Related Errors and Solutions

Error 1196: Warning: Some non-transactional changed tables: similar cause but fired during binlog operations.

Error 1030: Got error 134 from storage engine: can follow if a rollback leaves MyISAM in an inconsistent state.

Error 3025: Query interrupted: may occur when large rollbacks cause timeouts.

Common Causes

Non-transactional table inside a transaction

Executing DML on a MyISAM or MEMORY table while the session is wrapped in START TRANSACTION triggers the warning immediately.

Cross-engine DML statement

Statements like INSERT ... SELECT or UPDATE with JOIN that reference both InnoDB and MyISAM tables prompt an automatic rollback.

Replication engine mismatch

A replica using a non-transactional engine for a table that is transactional on the primary will roll back when it replays a mixed-engine statement.

Related Errors

Error 1196 - Non-transactional changed tables

Warns that binary logging encountered tables without transactional support, risking inconsistent replication.

Error 1030 - Got error 134 from storage engine

Indicates a physical problem with MyISAM that can appear after forced rollbacks.

Error 3006 - An unexpected replication rollback

Shown by Group Replication when a transaction cannot be applied due to engine limitations.

FAQs

Does Error 1622 always roll back my transaction?

Yes. Even though classified as a warning, MySQL cancels the entire transaction the moment it detects a non-transactional engine.

Can I safely ignore this warning in production?

No. Ignoring it means accepting silent data loss. Fix the schema or statement to eliminate the warning.

Which storage engines are affected?

MyISAM, MEMORY, Federated and Archive lack rollback support. InnoDB and NDB Cluster support transactions.

How does Galaxy help with this error?

Galaxy flags engine mismatches during query linting, surfaces MySQL warnings inline, and lets you bulk-convert tables to InnoDB from its schema panel.

Start Querying with the Modern SQL Editor Today!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Check out some other errors

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo