Bug #68505 | bundled libedit input bug using gbk | ||
---|---|---|---|
Submitted: | 27 Feb 2013 6:41 | Modified: | 1 Mar 2013 6:52 |
Reporter: | jiang xiaobing | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S2 (Serious) |
Version: | mysql5.5,mysql5.6 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[27 Feb 2013 6:41]
jiang xiaobing
[28 Feb 2013 9:46]
Sveta Smirnova
Thank you for the report. I can not repeat described behavior with Chinese text I pasted from some text which Google found for me. Please send repeatable text case and its results: - Chinese text you are trying to use. Better if this would be SQL file similar to mine: set names 'gbk'; select '汉语/漢語'; - Copy-paste or screenshot of MySQL session. So we can guess what happens for you after you input this Chinese text.
[28 Feb 2013 13:01]
MySQL Verification Team
Verified as described. When I copy "select '汉语/漢語'" and paste it to mysql CLI, then multi byte characters are truncated like below: mysql> set names gbk; Query OK, 0 rows affected (0.00 sec) mysql> select '/h'; +----+ | /h | +----+ | /h | +----+ 1 row in set (0.00 sec) I cannot input SJIS characters either. The problem doesn't happen on ReadLine. I applied the suggested patch, but the problem still happens.
[1 Mar 2013 6:52]
jiang xiaobing
Hi Sveta Smirnova: yes, you may be using the utf8 encoding chinese. and may using iconv to convert. and you can't using sql file to test. because mysql will not using the readline function. and I think "set names" is not neccessary. because this bug is not about mysql server. to Mikiya Okuno: I google the SJIS, it seems like GBK. both using two bytes for non ascii. this should fixed by this patch.