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

Prepared statements cause problems when done on all servers

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.2.4
    • Fix Version/s: N/A
    • Component/s: readwritesplit
    • Labels:
      None

      Description

      In some cases where a prepared statement is routed to all servers, one or more of the participating servers can fail to prepare it. The following are examples of when this can happen:

      • When a prepared statement targets a temporary table, which are created only on the master, the slaves fail to execute the session command. This causes errors to be logged as well as prevents the slaves from being used after that point.
      • SET autocommit=0 will take locks on slaves that should not be taken (slaves should never have open non-readonly transactions).
      • Preparing INSERT statements on Galera nodes can lead to deadlock errors, especially when SET autocommit=0 is used.

      At this moment, there is no simple solution to this as all prepared statements are prepared on all servers. The session commands would need to be partitioned by their type to allow execution only on one type of server.

        Attachments

          Issue Links

            Activity

              People

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