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
handshake. When the client starts to set up a connection. A 8-bits char set is included in proto: handshake_response41 , and tidb will parse it and set it to collection.
When ExecuteStmt is called, it will call loadCommonGlobalVariablesIfNeeded to load the global variable to the current session. However, for character_set_connection, the skipInit is set as true which means this step will be skipped:
That's why the global settings of character_set_connection does not take effect.
Some clients will also run an extra statement SET NAMES ... after the handshake. Then the charset/collation in the current session will be reset too. That depends on the client and its configurations. For MySQL client with version 8.0.3, it does not do it.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Then schedule a new connection using MySQL client:
2. What did you expect to see? (Required)
I use a mysql client with version
8.0.33
to do this testIn mysql 8.0.33, the new connection has the same
@@character_set_connection
with global settings:3. What did you see instead (Required)
But for TiDB,
@@global.character_set_connection
does not take effect:4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered: