Sequel Ace SET command interfering with ProxySQL setup #2006
Labels
Bug
Something isn't working
Feature Request
New feature or request
PR Welcome
Issues and fixes available for wide community to help us move forward by creating a PR with solution
Is Issue Present in Latest Beta?
Yes
Description
ProxySQL tracks all the session variables configured by the client using SET statements. It then forwards these settings to (potentially different) backends as required.
When it encounters a variable it does not know about, it cannot track it and must decide what to do about this. The setting
mysql-set_query_lock_on_hostgroup
is governing this.In newer versions of ProxySQL the default for
mysql-set_query_lock_on_hostgroup
is 1 which means that a connection is locked to a hostgroup when a SET for an unknown/untrackable variable is issued.It can then happen (subject to the cluster/ProxySQL configuration) that SELECT (read-only) queries should be routed to a different host group than the one the connection was initially established with/for. Usually that is a r/w group, it seems (which is sensible, I guess). This is called "query routing" in ProxySQL.
This seems to be exactly what is happening in my case. When I disable
mysql-set_query_lock_on_hostgroup
(set it to 0, see for example "9006 ProxySQL Error: connection is locked to hostgroup XX but trying to reach hostgroup YY" on SO), I can successfully issue a query. I cannot change this setting on our production server though.Most likely, the
SET information_schema_stats_expiry=0
mentioned in #1241 is the culprit, as it seems to be the only SET statement involved.It would be necessary to be able to prevent this statement to be issued for a connection to ProxySQL (or ProxySQL should learn to track this variable) for Sequel Ace to be usable against (such) Proxy SQL setups.
Steps To Reproduce
Expected Behaviour
The query should execute and return data.
Related Issues
#1241 is the exact same issue but was apparently not really followed up
Additional Context
This is related to the behaviour of ProxySQL (when it sees a SET for an unknown variable) and the specific MySQL cluster setup (using host groups to differentiate between read-write and read-only nodes). It is not easily testable without a quite complex cluster setup.
There is also an open discussion in ProxySQL's Github repo.
The text was updated successfully, but these errors were encountered: