Hello,
I've submitted this as an issue on Github - https://github.com/sysown/proxysql/issues/4864 - but just raising here in case anyone has run into something similar.
We have deployed ProxySQL as between our PHP application and MySQL 5.7 database (running on CloudSQL). We are running ProxySQL version 2.7.2, which is deployed as a Daemonset in GKE, using the official container image.
Our backend DB's charset is set to latin1 (to support accented characters) and ProxySQL has been configured with the following:
The issue we are facing occurs with one particular method in our application, where we set the charset on the fly to utf8mb4 when setting the charset on the fly. This method is used to be able to display emojis in one particular context.
The SQL statements as part of this method are:
We have also tried changing the above to `SET NAMES 'utf8mb4'`, which produces the same result.
When this occurs, the error message in ProxySQL is as follows:
`[ERROR] Detected a broken connection while running query on (1,[redacted],3306,49853034) , FD (Conn:65 , MyDS:65) , user [redacted] , last_used 9ms ago : 2027, Received malformed packet`
This corresponds to this error in the backend MySQL database:
`[Note] Aborted connection 49860686 to db: '[redacted]' user: '[redacted]' host: '[redacted]' (Got an error reading communication packets)`
This issue only occurs when the application is pointed to ProxySQL, not when it uses MySQL directly. Is there a supported method of setting the charset on the fly in the application code, or is there any additional configuration that can be applied to ProxySQL to handle this behaviour?
I'm happy to provide more logs or additional configuration of our ProxySQL instance.
Thanks very much in advance.