Bug #111818 | An improved idea to avoid writing garbled code in MySQL | ||
---|---|---|---|
Submitted: | 19 Jul 2023 15:12 | Modified: | 21 Jul 2023 2:51 |
Reporter: | tao jiang | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Charsets | Severity: | S2 (Serious) |
Version: | all | OS: | CentOS (CentOS Linux release 7.9.2009 (AltArch)) |
Assigned to: | CPU Architecture: | Any | |
Tags: | charset, garbled code |
[19 Jul 2023 15:12]
tao jiang
[19 Jul 2023 15:16]
tao jiang
I think this will help improve MySQL's ease of use.
[20 Jul 2023 7:17]
tao jiang
Is anybody there?
[20 Jul 2023 11:44]
MySQL Verification Team
Hi Mr. jiang, Thank you for your bug report. However, we can not accept your idea. Our entire character set interface is designed according to SQL standard. All the character sets and their place holders, like the one that you mention: | character_set_client | gbk | | character_set_connection | gbk | | character_set_database | utf8mb4 | | character_set_filesystem | binary | | character_set_results | utf8mb4 | | character_set_server | utf8mb4 | | character_set_system | utf8 | are defined by a standard that was followed to the last letter. Hence, this can not be changed. Not a bug.
[21 Jul 2023 2:51]
tao jiang
Hi, team. Thank you for your reply. It is not a bug exactly. Write at bugs.mysql.com is a little inappropriate. It should be said that this is actually a suggestion for improvement. I still think that as long as byte loss occurs during a write operation, you should return an error, which largely avoids garbled codes. So the inability to return an error is also due to compliance with SQL standards? Looking forward to your reply!
[21 Jul 2023 12:20]
MySQL Verification Team
Hi Mr. jiang, Yes, number of bytes for each character set is also a part of the standard. That is why there are graphenes out there that exist in utfmb4, but not in utfmb3, for example. Each character set is defined by a number of attributes, one of which is the maximum length of each character.