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

Autocommit tracking doesn't work correctly

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 6.1.4
    • 6.2.1
    • QueryClassifier
    • None

    Description

      The following example SQL demonstrates the problem when executed through readwritesplit.

      SET autocommit=0;
      COMMIT;
      SET autocommit=1;
      SELECT @@server_id, @@hostname;
      

      The last statement should be routed as an autocommit read but it is treated as if autocommit was still disabled.

      This is caused by a bug in an optimization for the transaction tracking code that reuses the query classification result instead of parsing the query multiple times. Due to the query classification cache, the canonical form of both autocommit statements would be SET autocommit=? and they would both be classified as the query type that first arrived. The solution is to never insert these types of queries into the cache.

      Attachments

        Activity

          People

            markus makela markus makela
            markus makela markus makela
            Votes:
            1 Vote for this issue
            Watchers:
            1 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.