Bug #64205 | Connected through Connector/J 5.1 to MySQL 5.5, the error message is garbled. | ||
---|---|---|---|
Submitted: | 2 Feb 2012 5:21 | Modified: | 25 May 2012 20:43 |
Reporter: | Nozomu Wakamatsu | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 5.1.18 | OS: | Any |
Assigned to: | Alexander Soklakov | CPU Architecture: | Any |
Tags: | language, lc_messages_dir, utf8 |
[2 Feb 2012 5:21]
Nozomu Wakamatsu
[2 Feb 2012 13:15]
Valeriy Kravchuk
Thank you for the bug report. Verified by code review. lc_messages_dir is not referenced anywhere in the code, so it just can not work correctly with MySQL server 5.5.
[3 Feb 2012 5:38]
Nozomu Wakamatsu
Thank you for response. Suggested fix is an interim measure of "lc_messages_dir". To resolve the garbled, would need to be modified further. For example,if "errorMessageEncodingMysql" is null, return to "character_set_results". If feasible, Should be encoded to each of column name and the error message. When will it be fixed?
[14 May 2012 9:32]
Alexander Soklakov
patch for cJ 5.1.20
Attachment: bug64205.diff (text/x-patch), 1.83 KiB.
[14 May 2012 9:35]
Alexander Soklakov
Thank you for the important bug report. I see no need to analyze "lc_messages_dir". As described in http://dev.mysql.com/doc/refman/5.5/en/charset-errors.html as of MySQL 5.5, the server constructs error messages using UTF-8 and returns them to clients in the character set specified by the character_set_results system variable. So the only need is to avoid old-style mapping (language->charset) and correctly analyze character_set_results. Look at attached patch, please.
[15 May 2012 6:33]
Nozomu Wakamatsu
Thank you for the patch. Attached a patch to Connector/J 5.1.20. I was confirmed that the problem has been resolved.
[25 May 2012 20:43]
John Russell
Added to changelog for 5.1.21: When Connector/J was connected to a MySQL 5.5 server, the error message for an invalid query could be returned in the wrong character set and appear garbled.