Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-38007

SELECT statement is affected by concurrent transaction under Read Uncommitted

    XMLWordPrintable

Details

    • Q4/2026 Server Maintenance

    Description

      Isolation Level: Read Uncommitted.
      The SELECT statement is affected by the blocked statement in another concurrent transaction.

      /* init */ DROP TABLE IF EXISTS t;
      /* init */ CREATE TABLE t(c1 INT NOT NULL, c2 INT NOT NULL);
      /* init */ INSERT INTO t(c1,c2) VALUES (2, 2);
       
      /* t1 */ BEGIN;
      /* t2 */ BEGIN;
      /* t2 */ INSERT INTO t(c1,c2) VALUES (5, 5);
      /* t2 */ SELECT * FROM t; -- [(2, 2), (5, 5)]
      /* t1 */ SELECT * FROM t; -- [(2, 2), (5, 5)]
      /* t1 */ DELETE FROM t WHERE TRUE; -- blocked
      /* t2 */ SELECT * FROM t ; -- [(5, 5)]
      /* t2 */ COMMIT; -- t1 unblocked
      /* t1 */ COMMIT;
      

      When the DELETE statement in transaction t1 is blocked, strangely, the second SELECT statement in transaction t2 only retrieved (5, 5), but failed to retrieve (2, 2).

      Attachments

        Activity

          People

            andrzej.jarzabek Andrzej Jarzabek
            John Jove John Jove
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 1.55d
                1.55d
                Remaining:
                Remaining Estimate - 1.55d
                1.55d
                Logged:
                Time Spent - Not Specified
                Not Specified

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.