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

Multi-statement commands may end up being stored in the session command history

    XMLWordPrintable

Details

    Description

      The following SQL ends up being stored in the session command history if it's in one COM_QUERY:

      SET autocommit=1; UPDATE test.t1 SET a = 1;
      

      The result of this is that upon reconnection, the whole query may be executed again, resulting in writes being sent to other servers than the master and potentially re-executing it again even on the master.

      The reason for this is that the QueryClassifier class doesn't correctly initialize a variable that controls whether the multi-statement detection is done or not. Additionally, the client protocol code returns the wrong value from a callback that would flag the query as a write even if the multi-statement code was correct.

      Attachments

        Issue Links

          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:
                Resolved:

                Git Integration

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