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

Weird read view after ROLLBACK of other transactions.

Details

    Description

      How to repeat:

      /* init */ CREATE TABLE t(a INT PRIMARY KEY, b INT UNIQUE);
      /* init */ INSERT INTO t(a) VALUES (1);
      /* t1 */ SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
      /* t2 */ SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
       
      /* t1 */ BEGIN;
      /* t2 */ BEGIN;
      /* t1 */ INSERT INTO t(a) VALUES (2);
      /* t2 */ SELECT a, b FROM t WHERE TRUE;  -- [(1, null), (1, null)]
      /* t1 */ ROLLBACK;
      /* t2 */ COMMIT;
      

      The SELECT statement of t2 was initially blocked by t1. Then it recovered after t1's ROLLBACK, but its query result contained two identical records (1, null). Interestingly, removing the UNIQUE constraint on column b eliminates this anomaly.

      Attachments

        Issue Links

          Activity

            Transition Time In Source Status Execution Times
            Marko Mäkelä made transition -
            Open Confirmed
            19h 21m 1
            Marko Mäkelä made transition -
            Confirmed In Progress
            20m 6s 1
            Marko Mäkelä made transition -
            In Progress In Review
            1h 18m 1
            Vladislav Lesin made transition -
            In Review Stalled
            13d 1h 31m 1
            Vladislav Lesin made transition -
            Stalled Closed
            1m 55s 1

            People

              vlad.lesin Vladislav Lesin
              zhuangliu Zhuang Liu
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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