-
Notifications
You must be signed in to change notification settings - Fork 977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad set Names sent when ProxySQL process a prepared statement #4200
Comments
Is your application executing 2 possible solutions:
Option 1 is preferred, as it completely reduce any extra latency caused by unnecessary |
No our application is not executing set Names when we used prepared statements (I checked it with tcpdump between the app and proxySQL to be sure). Another thing to precise, the mySQL is a Percona-xtradb-cluster. The problem is easily reproductible on our dev environnement. So if you want me to configure proxySQL with some debug values, just ask. |
Hello, Do you have any ideas? Do you need me to do some tests on our dev environment? |
Can you share the tcpdump between application and proxysql? |
Here it is. The two tcpdump was started and stopped at same time. In my previous post, I wrote SET NAMES coincided with the prepared statement but this is not true. I think i got a case where SET NAMES appeared at the same time. Thanks |
Hi @fplou . Thanks |
There is no "Conversion from collation" error in these dumps. I just wanted to show the "SET NAMES" sent by the ProxySQL. |
Here it is. I stopped the application, started both tcpdumps, started the application, ran the test and then stopped the tcpdumps. capture.6033 : app to ProxySQL You will see "SET NAMES latin1" (packets 2737, 2739, 2740, ...). But you will never see SET NAMES utf8. capture.3306 : ProxySQL to mySQL You will see "SET NAMES utf8" (packets 28, 1373, ...). But you will never see SET NAMES latin1. Our database is configured with latin1 not utf8. |
Hi @fplou , Thank you for the output provided, now I have everything to perform a proper analysis. The collation error on packet 4719 (and packet 4735) is on the client connection originated from port 52166 . So, as I was mentioning in my initial comment , "it probably means that your client is connecting using collation ProxySQL is enforcing what the client is asking for: the use of collation If you really want to use latin1 , you need to either force the jdbc driver to use latin1 during connection time, or issue the appropriate |
Thanks a lot for your answer. I did not notice this because my wireshark was not well configured. |
Hi,
We are facing an issue with ProxySQL version 2.3.2 and mySQL 8.0.29 :
2023-05-04 08:45:38 [INFO] ProxySQL version 2.3.2-10-g8cd66cf
Server version: 8.0.29-21.1 (ProxySQL)
ProxySQL is running on AlmaLinux release 8.6 (Sky Tiger)
Our database is configured using latin1 charset:
mysql> show variables like 'char%';
+--------------------------+---------------------------------------------+
| Variable_name | Value |
+--------------------------+---------------------------------------------+
| character_set_client | latin1 |
| character_set_connection | latin1 |
| character_set_database | latin1 |
| character_set_filesystem | binary |
| character_set_results | latin1 |
| character_set_server | latin1 |
| character_set_system | utf8mb3 |
| character_sets_dir | /usr/share/percona-xtradb-cluster/charsets/ |
+--------------------------+---------------------------------------------+
When we execute standard query, there is no problem. But when we execute prepared statement with an accent we get following error:
2023-05-04 13:57:51 MySQL_Session.cpp:3989:handler_minus1_LogErrorDuringQuery(): [WARNING] Error during query on (10,10.203.3.177,3306,7444): 3988, Conversion from collation utf8mb4_0900_ai_ci into latin1_swedish_ci impossible for parameter
With a tcpdump between proxySQL and mySQL, we can see proxySQL is sending a set Names request:
This set Names utf8mb4 and associated collation produce the error.
Regards
François
proxysql.log
The text was updated successfully, but these errors were encountered: