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

R/W Router sends DEALLOCATE PREPARE to ALL instead of MASTER

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.4.3
    • 2.0.0
    • readwritesplit
    • None
    • Any/All

    Description

      MaxScale sends DEALLOCATE PREPARE statements to all slaves instead of just the master. Since the PREPARE statement queries are only sent to the master, the DEALLOCATE PREPARE fails on the slaves causing the slave connections to be closed due to being inconsistent with the master.

      This seems to be due to DEALLOCATE PREPARE being treated as QUERY_SESSION_WRITE with no special handling to ensure it's routed to the same server (master) that PREPARE statement was sent to.

      Steps to reproduce (with R/W splitting enabled):
      PREPARE stmt1 FROM 'SELECT 1'; – routed to master only
      DEALLOCATE PREPARE stmt1; — sent to master and slave, causes error to be logged stating the slave session was closed due to be consistent

      Example error log:
      maxscale[24210]: (clientReply): Failed to execute session command in db001:3306. Error was: HY000 Unknown prepared statement handler (stmt1) given to DEALLOCATE PREPARE
      maxscale[24210]: (sescmd_cursor_process_replies): Slave server 'db1': response differs from master's response. Closing connection due to inconsistent session state.

      Attachments

        Activity

          People

            johan.wikman Johan Wikman
            tarq Christopher Tarquini
            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.