Bug #68366 | regression: >=mysql-5.4 utf8 collations are marked as not ascii compatible | ||
---|---|---|---|
Submitted: | 13 Feb 2013 16:03 | Modified: | 18 Jan 2018 13:19 |
Reporter: | Harm Geerts | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Charsets | Severity: | S5 (Performance) |
Version: | 5.5.29-0ubuntu0.12.10.1-log for debian- | OS: | Linux (Ubuntu 12.10) |
Assigned to: | CPU Architecture: | Any | |
Tags: | ASCII, performance, regression, utf8 |
[13 Feb 2013 16:03]
Harm Geerts
[13 Feb 2013 16:37]
Tatjana Nuernberg
prelim notes: (gdb) print character_set_client->csname $1 = 0x10774d4 "utf8" (gdb) print character_set_client->name $2 = 0x10774d9 "utf8_unicode_ci" (gdb) print all_charsets[character_set_client->number]->state $3 = 961 vs #define MY_CS_NONASCII 8192 (gdb) print my_charset_is_ascii_compatible(character_set_client) $11 = 1 '\001' ; (gdb) print character_set_client->name $6 = 0x3034328 "utf8_general_ci" (gdb) print all_charsets[character_set_client->number]->state $7 = 993 (the difference being MY_CS_PRIMARY, 32) (gdb) print my_charset_is_ascii_compatible(character_set_client) $8 = 1 '\001' An issue might of course still exist.
[13 Feb 2013 16:43]
Tatjana Nuernberg
(tested on trunk)
[13 Feb 2013 17:36]
Walter Doekes
You're right Tatjana, it is fixed in trunk (and 5.6), but not in 5.5. Compare: http://bazaar.launchpad.net/~mysql/mysql-server/5.5/view/head:/strings/ctype-uca.c http://bazaar.launchpad.net/~mysql/mysql-server/5.6/view/head:/strings/ctype-uca.c $ grep MY_CS_NONASCII ctype-uca-5.5.c -A1 | grep utf8 | wc -l 19 $ grep MY_CS_NONASCII ctype-uca-5.6.c -A1 | grep utf8 | wc -l 0 And: $ grep '"utf8_unicode_ci"' ctype-uca-5.5.c -B2 MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, "utf8", /* cs name */ "utf8_unicode_ci", /* name */ $ grep '"utf8_unicode_ci"' ctype-uca-5.6.c -B2 MY_CS_UTF8MB3_UCA_FLAGS,/* flags */ "utf8", /* cs name */ "utf8_unicode_ci", /* name */ Could that fix be backported to 5.5? See the #define MY_CS_UTF8MB3_UCA_FLAGS (MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE) changes in ctype-uca.c in http://bazaar.launchpad.net/~mysql/mysql-server/5.6/revision/2876.192.1 Kind regards, Walter Doekes OSSO B.V.
[9 Sep 2013 10:41]
Walter Doekes
Apparently http://bugs.mysql.com/bug.php?id=68795 was deemed important enough to fix. You could clean up the bug db and close this too. Note that the following message -- > Noted in 5.5.33, 5.6.13, 5.7.2 changelogs. > Comparison of a DATETIME value and a string did not work correctly > for the utf8_unicode_ci collation. -- would be so much cooler if it contained a link to a diff/patch file we could see.
[18 Jan 2018 13:19]
Erlend Dahl
Fixed in 5.6 and upwards.