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

Deadlock does not rollback transaction fully

    XMLWordPrintable

Details

    • Q3/2025 Maintenance

    Description

      Please see the repro file for instructions to reproduce.

      I have verified the issue manually using two mysql terminals so I can confirm 100% repeatability.

      I tested these DB engines:

      • MySQL 5.6 - affected
      • MySQL 5.7+ - NOT affected
      • MariaDB 10.5.4, 10.7, 10.11, 11.0, 11.5, 11.7 - affected
        (TLTR; all released MariaDB versions till today are affected and this issue is fixed in MySQL since v5.7 (at least since 5.7.15))

      The issue and the expectation is, when transaction is turned off, only explicit "BEGIN/START TRANSACTION" command can start a new transaction. In the repro, transaction is turned off by a deadlock error (not sure if that is expected, but I would say that is fine after an error/deadlock), but then, COMMIT on a different connection starts a new transaction!

      As this behaviour is highly dangerous I am marking this issue as CRITICAL.

      Attachments

        Issue Links

          Activity

            People

              debarun Debarun Banerjee
              mv Michael Voříšek
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.