Bug #42769 Character Set Problem
Submitted: 11 Feb 2009 16:34 Modified: 12 Feb 2009 10:34
Reporter: Alexander Finger Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Query Browser Severity:S3 (Non-critical)
Version:1.2.12 OS:MacOS (10.5.6)
Assigned to: CPU Architecture:Any
Tags: character set, problem, Query / Insert, utf8

[11 Feb 2009 16:34] Alexander Finger
Description:
This statement fails every time, when executed from script (as a part of a more complex script):

INSERT INTO tablename (varchar_col) VALUES ('Köter');

Error message:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version or the right syntax to use near " at line 1 (1064)

When copying the statement directly into the Query window, it works fine!

This error just occurs when reading SQL statements from script. It makes no difference if the file ist utf8, latin, MacRoman or whatever encoded.

For example, this works great too:

/usr/local/mysql-5.1.31-osx10.5-x86_64/bin/mysql -u dbuser testdb < test_easy.sql

How to repeat:
Just read german umlaute from script an try to insert them into a utf8 database.

My config:

[mysqld]
#If no specific storage engine/table type is defined in an SQL-Create statement the default type will be used.
default-storage-engine=innodb
#Set the default character set.
default-character-set=utf8
#Don't cache results that are bigger than this.
query_cache_limit=16M
#Lock mysqld in memory.(=Don't swap.)
memlock
#Use ANSI SQL syntax instead of MySQL syntax.
ansi
#Set the default collation.
default-collation=utf8_unicode_ci

Suggested fix:
For me it seems clear, the QueryBrowser Application fails passing SQL scripts from file to the MySQL server. The visualization is correct, when openeing and saving files they does not get corrupted... just the content sent to the server seems to be in the wrong encoding!

Fix the part which is responsible for sending script content to the MySQL server.
[11 Feb 2009 17:52] Susanne Ebrecht
Many thanks for writing a bug report.
We are on the way to implement the whole functionality of MySQL Query Browser into MySQL Workbench.
Unfortunately you are using an unsupported platform.

For more details about supported platforms please read here:

http://www.mysql.com/support/supportedplatforms/tools.html
[12 Feb 2009 10:34] Alexander Finger
> We are on the way to implement the whole functionality of MySQL Query
> Browser into MySQL Workbench.
> Unfortunately you are using an unsupported platform.

Will Mac OS X become a supported plattform when there is a stable version MySQL Workbench?

Best regards,

Alexander