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

MariaDB Error 1020 After an Upgrade: Diagnose Concurrent Update Conflicts

MariaDB ERROR 1020 means a record changed since the transaction last read it. Check the effective InnoDB settings and transaction timeline, then retry the full operation in a new transaction if safe.

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.

If MariaDB returns ERROR 1020 during a concurrent update, it means the record changed since the transaction last read it. In the documented InnoDB snapshot-isolation conflict case, MariaDB rolls back the entire transaction—not just the failed statement—so the safe recovery is to restart the business operation in a new transaction with fresh reads. An upgrade may have changed the effective innodb_snapshot_isolation setting, but the version label alone does not prove that was the cause.

What ERROR 1020 means

MariaDB identifies error 1020 as ER_CHECKREAD. Its current error reference says: “Record has changed since last read in table ‘%s’; try restarting transaction.” MariaDB’s error reference therefore describes a transaction conflict, not a generic indication that the SQL syntax is invalid.

As an Amazon Associate I earn from qualifying purchases.

One documented cause is an InnoDB update or delete under snapshot-isolation conflict detection: another transaction changes the row after the current transaction established its snapshot. In that case, MariaDB treats ER_CHECKREAD similarly to a deadlock and rolls back the whole transaction. MariaDB’s SET TRANSACTION documentation says the entire transaction is rolled back for this documented conflict behavior.

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

Why an upgrade may be related—but does not prove the cause

MariaDB documents innodb_snapshot_isolation as available in several release series, with defaults that vary by version. The documentation lists introduction points including 10.6.18, 10.11.8, 11.0.6, 11.1.5, 11.2.4 and 11.4.2; it says the default is ON from 11.6.2, while it is OFF by default in earlier series that introduced it, including 10.11 and 11.4. These are documented release distinctions, not proof of the setting on any particular MariaDB 12 installation. See InnoDB System Variables.

Package defaults, configuration files and explicit global or session assignments can affect the runtime value. The official documentation does not establish the configuration history of a specific upgraded server. Compare the exact server build and inspect the affected connection rather than attributing the error to the major-version number.

Check the affected server and connection

  1. Record the exact server version and build. Capture the version and distribution/package details both before and after the upgrade if available. A release-specific default is useful context, but it does not tell you whether a configuration override was in effect.
  2. Inspect the effective snapshot-isolation setting and transaction isolation. Run these on the affected connection:
    SELECT VERSION();
    SELECT @@GLOBAL.innodb_snapshot_isolation,
           @@SESSION.innodb_snapshot_isolation;
    SELECT @@SESSION.transaction_isolation;

    MariaDB documents the snapshot-isolation variable as dynamic and available at global and session scope; transaction isolation can also be inspected at runtime. The exact syntax and variable availability can depend on the server version. See InnoDB System Variables and SET TRANSACTION.

  3. Confirm the table uses InnoDB. The snapshot-isolation explanation applies to InnoDB; do not assume it explains a table using another storage engine.
  4. Reconstruct both transactions in order. Log each transaction’s begin, reads, writes, commit or rollback, plus the exact statement that failed. The key question is whether the transaction made its first consistent read before another transaction committed a change to the row.
  5. Inspect the indexes and execution plans. InnoDB locking is tied to index records and the access path selected by the query. A locking read may use a covering secondary index without visiting the clustered primary record. As a result, a FOR UPDATE read is not proof that every logically related update is blocked. Compare the actual indexes and plans for the read and write statements; see MariaDB’s InnoDB Lock Modes documentation.

Retry the whole transaction, not only the failed statement

For the documented snapshot-isolation conflict, the rollback covers the complete transaction. Retrying only the failed UPDATE can leave application logic relying on reads from a transaction that no longer exists. If the operation is safe to retry, catch error 1020 as a transaction conflict, begin a new transaction, repeat the full business operation with fresh reads, and then commit.

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

Bounded backoff and idempotency protections are sensible application-design choices when implementing retries, but MariaDB’s error documentation does not guarantee client-side automatic retries or prescribe those policies. The database’s recommendation is to restart the transaction.

Do not confuse replica SQL-thread retry settings with application behavior. MariaDB lists error 1020 in some replication retry contexts, but that does not mean a client library or application automatically retries a transaction. See Replication and Binary Log System Variables.

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

Understand the isolation trade-off before changing settings

Choice or behavior Effect relevant to this failure
REPEATABLE READ MariaDB’s default InnoDB isolation level; consistent reads within a transaction use the snapshot established by its first consistent read.
READ COMMITTED Each consistent read takes a fresh snapshot. This changes snapshot and locking behavior; it is not simply a switch that guarantees the conflict disappears.
innodb_snapshot_isolation enabled In the documented conflict case, an update or delete can fail when another transaction changed the row after the current transaction’s snapshot was established; the whole transaction is rolled back.
innodb_snapshot_isolation disabled MariaDB says disabling it restores traditional current-read behavior for locking reads, UPDATE and DELETE, but notes this can produce non-repeatable-read anomalies.

These behaviors are described in MariaDB’s transaction-isolation reference and InnoDB variable reference. Change the variable or isolation level only after deciding which consistency guarantees the application requires. A configuration change can alter results observed by transactions; it is not a substitute for confirming the conflict schedule and the application’s correct recovery behavior.

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.

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

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
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

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.