-
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
Change default charset and collation from utf8 to utf8mb4 #7920
Comments
MySQL 5.7 default is latin1. MySQL 8.0 is utf8mb4. Tidb being UTF8 is weird - because it matches neither. So +1 for changing to utf8mb4 :) |
Actually, TiDB treats all the data as utf8mb4. So I think we could return utf8mb4 in the |
@shenli return utf8mb4 anyway in the |
I think it is too nuanced that tidb treats UTF8 the same as utf8mb4. There are some apps that look for utf8mb4 specifically. |
We have a discussion about this issue, and come to a conclusion:
@morgo FYI |
LGTM |
I have a pull request that does this (for new users): #7757 |
TiDB default charset is utf8 and collation is utf8_bin, in some cases, if the Unicode string length is more than 3 bytes(4 bytes), insert this string into a column with utf8 charset will report error like:
Maybe we should consider to change TiDB default charset from utf8 to utf8mb4?
@morgo what's your opinion?
The text was updated successfully, but these errors were encountered: