-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
- A clear description of the issue
When creating a backend connection, if the frontend connection has configured a collation with id larger than 255 (for example using SET NAMES utf8mb4 COLLATE utf8mb4_0900_as_ci; , ProxySQL may try to create a new connection using such collation.
The problem is that at protocol level, during handshake only 1 byte can be used to configure the collation.
That means that if ProxySQL sets a collation greater than 255 , only the less significant byte is used.
Therefore even if ProxySQL believes that the backend connection will use the specified collation, mysql_real_connect() is using a different collation. For example, using collation 305 will lead to use collation 49 (305-256).
- ProxySQL version
All to to-date
- OS version
All
- The steps to reproduce the issue
Start proxysql with basic configuration, and without any traffic.
Create a new connection, and issue the following commands:
SET NAMES utf8mb4 COLLATE utf8mb4_0900_as_ci;
SHOW VARIABLES LIKE 'character_set%';
The character set reported will be incorrect (latin1) .
- The full ProxySQL error log (default location:
/var/lib/proxysql/proxysql.log)
Nothing relevant
Progress
- fix in 2.7 : TBD
- fix in 3.0 : Fix issue #4841 #4842