-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Update collations and make utf8mb4 default #877
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
Conversation
gofmt please? |
Travis checks gofmt and no error is reported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we maybe make this version dependent instead?
According to https://www.monolune.com/what-is-the-utf8mb4_0900_ai_ci-collation/ the default collation is utf8mb4_0900_ai_ci
since MySQL 8.0.1.
We already know the server version at the point where we send the collation.
So we could use utf8_general_ci
for server version < 5.5.3, utf8mb4_general_ci
for < 8.0.1 and utf8mb4_0900_ai_ci
for 8.0.1 and newer.
Personally speaking, I prefer stable behavior to "automatically changing default".
I don't want to parse MySQL version string. MySQL version string syntax is not defined.
Later is possible without parsing version string. Initial packet contains server's default collation id. But personally speaking, I don't like dynamic default. I prefer stable behavior. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
If the collation default is not the same as my DB I'm connecting to, should I be worried? https://stackoverflow.com/questions/55998671/connecting-with-wrong-collation-to-a-mysql-server |
@kaihendry Your question is not specific to this driver. It's general to any MySQL driver. |
Description
Update collations table based on MySQL 8.0.12.
Fixes #839
Checklist