Bug #13487 Japanese data inside a comment causes the syntax error
Submitted: 26 Sep 2005 14:29 Modified: 20 Oct 2005 6:51
Reporter: Victoria Reznichenko Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1 OS:Linux (linux)
Assigned to: Alexander Barkov CPU Architecture:Any

[26 Sep 2005 14:29] Victoria Reznichenko
Description:
If you specify --default-character-set=cp932 and execute the script that has japanese comment, MySQL produces the syntax error.
Without --default-character-set=cp932 it works fine.
Data in test-mb.txt file is in cp932 encoding.

$ ./bin/mysql --default-character-set=cp932 < /tmp/test-mb.txt
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '┐e┐X┐g
SELECT 1' at line 1

How to repeat:
1. Download file test-mb.txt
2. shell> mysql --default-character-set=cp932 < test-mb.txt
[26 Sep 2005 14:30] MySQL Verification Team
test-mb.txt

Attachment: test-mb.txt (text/plain), 25 bytes.

[28 Sep 2005 10:51] 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/internals/30430
[14 Oct 2005 9:25] Alexander Barkov
Fixed in 4.1.16 and 5.0.16.
[20 Oct 2005 6:51] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented in 4.1.16 and 5.0.16 changelogs; closed.