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

UPDATE is not blocked by DELETE, resulting in incorrect final database state

    XMLWordPrintable

Details

    • Not for Release Notes

    Description

      Isolation Level: Read Uncommitted.
      UPDATE statement is not blocked by the DELETE statement of another transaction, and does not update any rows, resulting in incorrect final database state.

      /* init */ CREATE TABLE t (c1 INT);
      /* init */ INSERT INTO t (c1) VALUES (1);
       
      /* t1 */ BEGIN;
      /* t1 */ DELETE FROM t;
      /* t2 */ BEGIN;
      /* t2 */ UPDATE t SET c1 = 2;
      /* t1 */ ROLLBACK;
      /* t2 */ COMMIT;
      /* t2 */ SELECT * FROM t; -- [(1)]
      

      We expect UPDATE statement to be blocked, and the final database is [(2)].

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              uniqueR Ryan
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.