Bug #77907 The null character '\0' is ignored by strcmp when collation is utf8_unicode_ci
| Submitted: | 2 Aug 2015 5:01 | Modified: | 27 Oct 2015 11:11 |
|---|---|---|---|
| Reporter: | Jaime Sicam | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server: Charsets | Severity: | S3 (Non-critical) |
| Version: | 5.1.76, 5.5.46, 5.6.26, 5.6.27 and 5.7.9 | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[2 Aug 2015 5:01]
Jaime Sicam
[3 Aug 2015 6:42]
MySQL Verification Team
Hello Jaime, Thank you for the report. Verified as described on 5.1.76, 5.5.46, 5.6.26, 5.6.27 and 5.7.9 builds. Thanks, Umesh
[5 Aug 2015 19:05]
Sveta Smirnova
Further studies showed this is not a bug: according to http://dev.mysql.com/doc/refman/5.6/en/charset-unicode-sets.html "utf8_unicode_ci also supports contractions and ignorable characters. utf8_general_ci is a legacy collation that does not support expansions, contractions, or ignorable characters. It can make only one-to-one comparisons between characters." and \0 is such ignorable character, specified at http://www.unicode.org/Public/UNIDATA/DerivedCoreProperties.txt
[27 Oct 2015 11:11]
Erlend Dahl
Posted by developer: [25 Oct 2015 23:31] Xing Z Zhang Agree with Sveta Smirnova's comments. This is "by design". Control characters like '\0' is ignorable in UCA, which is implemented in utf8_unicode_ci and other collations.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.052 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.