Bug #314 | GROUP BY forces functions to treat multy-byte charset values as single-byte | ||
---|---|---|---|
Submitted: | 22 Apr 2003 17:01 | Modified: | 26 Apr 2003 4:22 |
Reporter: | Alexander Keremidarski | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 4.0 | OS: | |
Assigned to: | Alexander Barkov | CPU Architecture: | Any |
[22 Apr 2003 17:01]
Alexander Keremidarski
[25 Apr 2003 9:09]
Michael Widenius
This is a display problem in the mysql command line client that is probably not likely to happen in a client that support ujis. The test case is also not repeatable as it doesn't contain all information to repeat it.
[25 Apr 2003 9:24]
Alexander Keremidarski
It is not display problem only. Here is variation of above test with using HEX() values: mysql> select HEX(c), length(c) as lc1, HEX(left(c,1)) as c1 from x order by c; +----------------------+------+------+ | HEX(c) | lc1 | c1 | +----------------------+------+------+ | 61 | 1 | 61 | | 61626364 | 4 | 61 | | 61757434686766 | 7 | 61 | | 62 | 1 | 62 | | 63 | 1 | 63 | | 64 | 1 | 64 | | A4A2 | 2 | A4A2 | | A4A2A4A4A4A6A4A8A4AA | 10 | A4A2 | | A4A2A4ABA4B5A4BFA4CA | 10 | A4A2 | | A4A4 | 2 | A4A4 | | A4A6 | 2 | A4A6 | | A4A8 | 2 | A4A8 | | A4AA | 2 | A4AA | +----------------------+------+------+ 13 rows in set (0.01 sec) mysql> select HEX(c), length(c) as lc1, HEX(left(c,1)) as c1 from x group by c order by c; +----------------------+------+------+ | HEX(c) | lc1 | c1 | +----------------------+------+------+ | 61 | 1 | 61 | | 61626364 | 4 | 61 | | 61757434686766 | 7 | 61 | | 62 | 1 | 62 | | 63 | 1 | 63 | | 64 | 1 | 64 | | A4A2 | 2 | A4 | | A4A2A4A4A4A6A4A8A4AA | 10 | A4 | | A4A2A4ABA4B5A4BFA4CA | 10 | A4 | | A4A4 | 2 | A4 | | A4A6 | 2 | A4 | | A4A8 | 2 | A4 | | A4AA | 2 | A4 | +----------------------+------+------+
[26 Apr 2003 4:22]
Michael Widenius
Thank you for your bug report. This issue has been fixed in the latest development tree for that product. You can find more information about accessing our development trees at http://www.mysql.com/doc/en/Installing_source_tree.html Fixed a bug concerning RIGHT, LEFT & MID when used with multi-byte-character-sets and GROUP BY