Bug #33791 | Wrong ORDER BY with latin2_czech_cs | ||
---|---|---|---|
Submitted: | 10 Jan 2008 11:23 | Modified: | 28 Jul 2008 20:41 |
Reporter: | Alexander Barkov | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Charsets | Severity: | S3 (Non-critical) |
Version: | 6.0 | OS: | Any |
Assigned to: | Alexander Barkov | CPU Architecture: | Any |
[10 Jan 2008 11:23]
Alexander Barkov
[18 Jan 2008 20:38]
Patrick Crews
cp1250_czech_cs is failing mysql-test for all engines as well. These two collations are causing the test failures.
[17 Mar 2008 13:14]
Alexander Barkov
The same happens with CHAR column as well.
[17 Mar 2008 13:38]
Alexander Barkov
When committing, don't forget to activate main.ctype_latin2_ch which is currently disabled.
[26 Mar 2008 11:10]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/44443 ChangeSet@1.2606, 2008-03-26 15:03:51+04:00, bar@mysql.com +55 -0 Bug#33791 Wrong ORDER BY with latin2_czech_cs Problem: ORDER BY didn't take into account accents and cases in multi-level collations (latin2_czech_cs and cp1250_czech_cs). This happened because my_strnxfrm_xxx() family functions were executed with wrong "nweights" argument, so only primary level weights padded by primary weights for SPACE character were written into the result. Bug was introduced in 6.0 with WL#3664 "strnxfrm() changes for prefix keys and NOPAD" (for Falcon). Fix: pass correct "nweights" argument, pad each level to "nweights" separetely, and additionally pad the result string to generate fixed length records. Additional changes: - New syntax was added: WEIGHT_STRING(expr, result_length, nweights, flags) which is a great help for testing purposes. - my_stnxfrm_xxx() family functions now write partial weights if the full weight doesn't fit. This gives a little bit better ORDER BY for strings longer than @@max_sort_length. - Removing duplicate functions and introducing my_strnxfrm_unicode() which is compatible with utf8, utf8mb4, ucs2, utf16, utf32.
[26 Mar 2008 11:33]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/44444 ChangeSet@1.2606, 2008-03-26 15:26:49+04:00, bar@mysql.com +55 -0 Bug#33791 Wrong ORDER BY with latin2_czech_cs Problem: ORDER BY didn't take into account accents and cases in multi-level collations (latin2_czech_cs and cp1250_czech_cs). This happened because my_strnxfrm_xxx() family functions were executed with wrong "nweights" argument, so only primary level weights padded by primary weights for SPACE character were written into the result. Bug was introduced in 6.0 with WL#3664 "strnxfrm() changes for prefix keys and NOPAD" (for Falcon). Fix: pass correct "nweights" argument, pad each level to "nweights" separetely, and additionally pad the result string to generate fixed length records. Additional changes: - New syntax was added: WEIGHT_STRING(expr, result_length, nweights, flags) which is a great help for testing purposes. - my_stnxfrm_xxx() family functions now write partial weights if the full weight doesn't fit. This gives a little bit better ORDER BY for strings longer than @@max_sort_length. - Removing duplicate functions and introducing my_strnxfrm_unicode() which is compatible with utf8, utf8mb4, ucs2, utf16, utf32.
[7 May 2008 9:56]
Sergey Vojtovich
Ok to push.
[23 Jul 2008 13:18]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/50318 2739 Georgi Kodinov 2008-07-23 fixed 5.1-bugteam -> 6.0-bugteam merge problems
[24 Jul 2008 12:19]
Alexander Barkov
Pushed into mysql-6.0.7-bugteam.
[24 Jul 2008 14:54]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/50423 2747 Kristofer Pettersson 2008-07-24 Added files previously roaming the trees with the file extension OTHER causing issues with the conflict resolution system.
[28 Jul 2008 14:45]
Bugs System
Pushed into 6.0.7-alpha (revid:alik@mysql.com-20080725172155-fnc73o50e4tgl23k) (version source revid:alik@mysql.com-20080725172155-fnc73o50e4tgl23k) (pib:3)
[28 Jul 2008 20:41]
Paul DuBois
Noted in 6.0.7 changelog. ORDER BY failed to take into account accents and lettercases in multi-level collations (latin2_czech_cs and cp1250_czech_cs).
[14 Sep 2008 3:44]
Bugs System
Pushed into 6.0.7-alpha (revid:bar@mysql.com-20080723094350-6s6xru573ie0aqku) (version source revid:v.narayanan@sun.com-20080820070709-nx09bk6qx81osd5s) (pib:3)