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

Autocommit tracking doesn't work correctly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 6.1.4
    • Fix Version/s: 6.2.1
    • Component/s: QueryClassifier
    • Labels:
      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

            Assignee:
            markus makela markus makela
            Reporter:
            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.