Bug #48980 | mysql client field length for utf8 is twice number of letters (is | ||
---|---|---|---|
Submitted: | 23 Nov 2009 10:00 | Modified: | 24 Nov 2009 6:47 |
Reporter: | Peter Volkov | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Charsets | Severity: | S3 (Non-critical) |
Version: | 5.0.84, 5.0, 5.1 bzr | OS: | Any |
Assigned to: | Assigned Account | CPU Architecture: | Any |
[23 Nov 2009 10:00]
Peter Volkov
[23 Nov 2009 12:23]
Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php Please read bug #7616 for explanation.
[23 Nov 2009 13:12]
Peter Volkov
Thank you. I saw that bug before and I don't think it is relevant here and to avoid mixing with that bug I even showed explicitly that I've started mysql with --default-character-set=utf8 option. Also note that same problem is there in answer of Alexander Barkov: mysql> select * from test; +--------+ | a | +--------+ | aaa | ^^^ - this space is a bug reported here.
[23 Nov 2009 13:23]
Sveta Smirnova
Thank you for the feedback. I can not repeat described behavior if start mysql client with option --default-character set. Screenshot will be uploaded shortly. Have you issued SET NAMES UTF8; before running SELECT query? Which package do you use (filename you downloaded)? Could you please try current version 5.0.88 available at our download site and check if bug still exists in your environment?
[23 Nov 2009 13:26]
Sveta Smirnova
correct call of client
Attachment: correct_call.jpg (image/jpeg, text), 69.64 KiB.
[23 Nov 2009 13:27]
Sveta Smirnova
incorrect call of client
Attachment: incorrect_call.jpg (image/jpeg, text), 60.34 KiB.
[23 Nov 2009 14:17]
Peter Volkov
Take a look at your at _correct_call.jpg_ screenshot. It has bug I'm talking about here. Note space after абв and before | Again: +--------+ | a | +--------+ | абв | ^^^ this three spaces are bug. The number of spaces is equal to three only in case of three letter, and if you put even my rather short name there: Пётр Волков you'll see: mysql> select * from test; +-----------------------+ | a | +-----------------------+ | абв | | абвгдеё | | Пётр Волков | ^^^^^^^^^^ - how many space is here... :( And this space makes following fields hard to read since they may occur on next lines... And just compare how it should look in case of english letters: mysql> select * from test; +--------+ | a | +--------+ | abc | | abcdef | +--------+ 2 rows in set (0.00 sec) after letter f exactly single space and then | HTH.
[23 Nov 2009 14:30]
Peter Volkov
correct_call.jpg with bug highlighted
Attachment: correct_call.jpg (image/jpeg, text), 70.75 KiB.
[24 Nov 2009 6:47]
Sveta Smirnova
Thank you for the feedback. Got your point. Set as "Verified".
[5 Nov 2014 15:25]
Daniël van Eeden
Reproducable on 5.6.21. mysql [test2] > CREATE TABLE `test` ( -> `a` text -> ) ENGINE=MyISAM DEFAULT CHARSET=utf8; Query OK, 0 rows affected (0.00 sec) mysql [test2] > insert into test values ('абвгдеё'); Query OK, 1 row affected (0.01 sec) mysql [test2] > select * from test; +----------------+ | a | +----------------+ | абвгдеё | +----------------+ 1 row in set (0.00 sec)