You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use query rewrite rules to get rid of "SET character_set_client=utf8" that is being sent to my (Clickhouse-using-MySQL-protocol) backend by the MySQL Workbench client (which makes any connection attempt fail). Using ProxySQL version 2.2.0-72-ge14accd, codename Truls.
I added this rule in an attempt to neutralize all SET statatements:
INSERT INTO mysql_query_rules (active, match_pattern, replace_pattern) VALUES (1,"^SET .*$", "select * from system.parts where 1=0");
LOAD MYSQL QUERY RULES TO RUNTIME;
If I use the mysql CLI client, I can see in stats.stats_mysql_query_rules that the rule works when I execute the statement "SET character_set_client=utf8" directly through it. But when I try connecting through the MySQL Workbench, the rule does not fire, rather, the statement is passed through to the backend Clickhouse, where I of course get the error:
executeQuery: Code: 62. DB::Exception: Syntax error: failed at position 26 ('utf8'): utf8. Expected one of: TRUE, FALSE, literal, NULL, number, Bool, true, false, string literal. (SYNTAX_ERROR) (version 21.12.2.17 (official build)) (from 127.0.0.1:41456) (in query: SET character_set_client=utf8)...
(The reason why I'm not using the Clickhouse module of ProxySQL is that it reliably crashes ProxySQL - but that's another story.)
The text was updated successfully, but these errors were encountered:
FWIW, I got it to connect by recompiling ProxySQL with the following patch (which is obviously not a good idea to include in any official code base, just a proof-of-concept)
I'm trying to use query rewrite rules to get rid of "SET character_set_client=utf8" that is being sent to my (Clickhouse-using-MySQL-protocol) backend by the MySQL Workbench client (which makes any connection attempt fail). Using ProxySQL version 2.2.0-72-ge14accd, codename Truls.
I added this rule in an attempt to neutralize all SET statatements:
INSERT INTO mysql_query_rules (active, match_pattern, replace_pattern) VALUES (1,"^SET .*$", "select * from system.parts where 1=0");
LOAD MYSQL QUERY RULES TO RUNTIME;
If I use the mysql CLI client, I can see in stats.stats_mysql_query_rules that the rule works when I execute the statement "SET character_set_client=utf8" directly through it. But when I try connecting through the MySQL Workbench, the rule does not fire, rather, the statement is passed through to the backend Clickhouse, where I of course get the error:
executeQuery: Code: 62. DB::Exception: Syntax error: failed at position 26 ('utf8'): utf8. Expected one of: TRUE, FALSE, literal, NULL, number, Bool, true, false, string literal. (SYNTAX_ERROR) (version 21.12.2.17 (official build)) (from 127.0.0.1:41456) (in query: SET character_set_client=utf8)...
(The reason why I'm not using the Clickhouse module of ProxySQL is that it reliably crashes ProxySQL - but that's another story.)
The text was updated successfully, but these errors were encountered: