Bug #13487 Japanese data inside a comment causes the syntax error
Submitted: 26 Sep 2005 16:29 Modified: 20 Oct 2005 8:51
Reporter: Victoria Reznichenko
Status: Closed
Category:Server Severity:S3 (Non-critical)
Version:4.1 OS:Linux (linux)
Assigned to: Alexander Barkov Target Version:

[26 Sep 2005 16: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 16:30] Victoria Reznichenko
test-mb.txt

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

[28 Sep 2005 12: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 11:25] Alexander Barkov
Fixed in 4.1.16 and 5.0.16.
[20 Oct 2005 8: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.