Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-7784

The statement after SET autocommit=0 with SET SESSION READ ONLY is not counted as a start of a transaction

    XMLWordPrintable

Details

    • Bug
    • Status: In Review (View Workflow)
    • Major
    • Resolution: Unresolved
    • 25.10.4, 26.10.0
    • 25.10, 26.10
    • None
    • None

    Description

      Executing SET SESSION TRANSACTION READ ONLY and turning off autocommit breaks the transaction boundary detection and all statements done inside it are treated as if they were outside of a transaction. The transaction remains in read-only mode on all connections but the statements are not necessarily routed to the same backend, like they should be, which breaks transactionality and different states of the database can be observed inside of a single transaction which is wrong under certain isolation modes.

      SET SESSION TRANSACTION READ ONLY;
      SET autocommit=0;
      SELECT @@server_id; -- This is not considered to be inside of a transaction
      

      Attachments

        Activity

          People

            markus makela markus makela
            markus makela markus makela
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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