sysown / proxysql

High-performance MySQL proxy with a GPL license.
http://www.proxysql.com
GNU General Public License v3.0
6.07k stars 985 forks source link

lc_messages server variable not recognized #2937

Open ggunson opened 4 years ago

ggunson commented 4 years ago

Because lc_messages is an unknown server variable for ProxySQL, a client that attempts to set that value will end up locking to hostgroup.

(Discovered through testing the problem reported in https://groups.google.com/forum/#!topic/proxysql/ih05FKDFnNk)

Using the docker-mysql-proxysql setup with its default settings and connecting with the mysql command line client:

mysql> select now(); set lc_messages='en_US'; select now();
+---------------------+
| now()               |
+---------------------+
| 2020-07-09 05:23:09 |
+---------------------+
1 row in set (0.01 sec)

Query OK, 0 rows affected (0.02 sec)

ERROR 9006 (Y0000): ProxySQL Error: connection is locked to hostgroup 0 but trying to reach hostgroup 1

From the ProxySQL log:

2020-07-09 05:23:09 MySQL_Session.cpp:6483:unable_to_parse_set_statement(): [WARNING] Unable to parse unknown SET query from client 172.18.0.1:33870. Setting lock_hostgroup. Please report a bug for future enhancements:set lc_messages='en_US'

This was found when testing why phpMyAdmin was hitting errors connecting through ProxySQL. Likely other clients that set lc_messages may hit the same problem.

If you are submitting a reproducible bug report, please provide:

ggunson commented 4 years ago

In https://github.com/sysown/proxysql/issues/2943 we're talking about adding documentation for workarounds to GUI clients running set profiling=1. If it's decided that set lc_messages isn't going to be supported (or delayed on the roadmap) then it should be included in that documentation as well.