Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
2.2.15
-
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.