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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.2.15
    • Fix Version/s: 2.3.1
    • Component/s: N/A
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              johan.wikman Johan Wikman
              Reporter:
              valerii Valerii Kravchuk
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration