October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

The Rollback That Only Rolled Back Half of It: MySQL Table Engines Explained

A MySQL transaction can roll back InnoDB changes while leaving MyISAM writes in place. Here’s how to inspect the affected tables and design for recoverable failures.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A successful ROLLBACK does not undo every write in a MySQL operation if the operation touches both InnoDB and MyISAM tables. InnoDB supports transactions; MyISAM does not. The practical consequence is simple but easy to miss in legacy systems: one part of a workflow can be undone while another remains in place.

Paulo Antunes described finding exactly that boundary while testing a release operation in a legacy Delphi ERP. His account is a useful reminder to check the storage engines of the tables an operation actually touches—not just whether the code starts a transaction.

As an Amazon Associate I earn from qualifying purchases.

What happened in the ERP release operation?

Antunes was testing a production ERP screen that releases material from a returned box. The operation wrote to an item table and a volume table. The item table used InnoDB; the volume table used MyISAM. After the code issued ROLLBACK, the item change was undone, but the volume write remained. As Antunes put it, “The rollback ran. No error. And half of it stayed.” (Paulo Antunes’s account.)

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In the repository snapshot he described, the schema export listed 342 tables and 6,477 columns but did not include storage-engine metadata. Those counts describe Antunes’s system in 2026, not a general MySQL statistic. He checked the live database instead.

Why did ROLLBACK leave data behind?

A transaction can roll back changes only for tables whose storage engines support transactions. MySQL 8.4 documentation describes InnoDB as transaction-safe, with commit, rollback, and crash-recovery capabilities. It describes MyISAM as having no transaction support. MySQL allows tables in the same schema to use different storage engines, so a transaction may touch both kinds of table without making all the writes equally reversible. (MySQL 8.4 storage-engine documentation; InnoDB transaction model.)

That means a transaction wrapper, ORM, or successful update count cannot make a MyISAM write transactional. If a workflow changes an InnoDB row and a MyISAM row, ROLLBACK can undo the InnoDB change while leaving the MyISAM change intact.

“Is this atomic?” Audit the tables involved

There is no reliable schema-wide yes-or-no answer when a workflow spans tables with different engines. Inspect the live schema and identify every table the operation reads or changes. Antunes used information_schema.TABLES to check the engine recorded for each table.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
SELECT TABLE_NAME, ENGINE
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = 'your_database_name'
ORDER BY TABLE_NAME;

Replace your_database_name with the schema being checked. To narrow the result to tables in a particular workflow, add a condition such as AND TABLE_NAME IN ('item_table', 'volume_table'), using the actual table names. Check the live database: a schema export that omits engine metadata cannot answer which tables support rollback.

What does not roll back—and how should code handle it?

In Antunes’s release routine, the design response was not to pretend the two writes could be atomic. It was to validate early, choose the failure state deliberately, and make an interrupted operation safe to retry. The ordering below reflects that particular ERP workflow; another system may need a different sequence.

  1. Validate every affected row before the first write. If any row fails the operation’s requirements, stop before changing either table.
  2. Repeat safety conditions in each update’s WHERE clause. This helps prevent a row from changing between validation and mutation from bypassing the checks.
  3. Commit the reversible InnoDB write first, then perform the MyISAM write. This order deliberately determines what remains if the process stops between operations. It does not restore atomicity.
  4. Choose the partial state that is safer and visible to operators. In Antunes’s example, released item codes alongside a stale volume pointer were easier to recover from than a volume that appeared released while its item code still blocked reuse. That is the failure-state choice for his scenario, not a universal rule.
  5. Make the operation safe to retry. The described updates set fields to NULL only while the relevant conditions remain true, allowing a second run to complete an interrupted operation rather than incorrectly changing unrelated data.

Before adopting this pattern, assess which change is reversible, what each possible interruption point leaves behind, and how an operator will detect and repair that state. If a nontransactional write has already happened, rolling back the transactional part alone may make the database more inconsistent rather than less.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How does this apply elsewhere in the ERP?

Antunes says a separate queue and stock-entry routine also crosses an InnoDB/MyISAM boundary. A third quality-check routine touches only InnoDB tables, so he can use a single transaction for that set of changes. He also notes that changing MyISAM indexes in his system can require a table rebuild and a lock. Those are observations about his ERP; the operational cost of changing legacy tables depends on the system.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What if the workflow crosses separate systems?

The same recovery question arises when one operation updates a database and an object store, writes a database row and sends a message, or calls a payment API and records the result locally. These pairs do not share a MySQL transaction merely because an application coordinates them. Define the boundary honestly, decide how to detect and repair partial completion, and make retries safe. The appropriate recovery or compensation design depends on the systems involved.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.