-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
SET NAMES utf8mb4
does not change collation_connection
when default_collation_for_utf8mb4
is modified
#56439
Comments
According to the "15.7.6.3 SET NAMES Statement", https://dev.mysql.com/doc/refman/8.0/en/set-names.html
set names statement should change the |
Note that this variable has been deprecated in MySQL:
An alternative way of doing this is to specify the collation when running
This also works in TiDB:
I think it would still be good to make sure |
Bug Report
SET NAMES utf8mb4
does not changecollation_connection
whendefault_collation_for_utf8mb4
is modified.1. Minimal reproduce step (Required)
% mysql --comments --host 127.0.0.1 --port 4000 -u root
default_collation_for_utf8mb4
collation_connection
default_collation_for_utf8mb4
value toutf8mb4_general_ci
SET NAMES utf8mb4
collation_connection
value afterdefault_collation_for_utf8mb4
has been modified toutf8mb4_general_ci
.2. What did you expect to see? (Required)
The last
collation_connection
value should showutf8mb4_general_ci
asdefault_collation_for_utf8mb4
modified toutf8mb4_general_ci
3. What did you see instead (Required)
The last
collation_connection
value showsutf8mb4_bin
.4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: