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

SELECT ... INTO OUTFILE is routed to all back end servers



    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 2.2.15
    • 2.3.1
    • N/A
    • None


      Probably this is by design, but I just noted that readwritesplit router consider any SELECT ... INTO OUTFILE statement as "session command" and route them to all back end servers. This is NOT explicitly documented in KB, https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale-22-readwritesplit/

      It seems that even if we put the statement into transaction, file is still created on all back ends. I see the following problems with this design:

      1. SELECT that can read and write a lot of data is executed on every back end even this is not needed/intended. This is a waste of resources.

      2. If back ends are running on the same OS or use shared filesystem, writes on some of them fail as file exists, but we do not get any warning or error while on at least one of back end servers this statement is completed successfully. Sessions on toehr back ends get closed:

      2018-10-12 11:39:23   warning: (7) [readwritesplit] Slave server 'server2': response (0xff) differs from master's response (0x00) to COM_QUERY: `select user, host from mysql.user into outfile '/tmp/users2.txt'`. Closing slave connection due to inconsistent session state.

      So, please, document current design if this is intended feature and provide some option/way to route such queries only to Master or any back end server specified by the hint.


        Issue Links



              johan.wikman Johan Wikman
              valerii Valerii Kravchuk
              0 Vote for this issue
              2 Start watching this issue



                Git Integration

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