Bug #16588 SHOW CREATE TABLE command garbles Unicode names
Submitted: 17 Jan 2006 23:25 Modified: 15 Apr 2006 9:09
Reporter: David Christian Email Updates:
Status: Duplicate Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:5.0.13 OS:Windows (Windows XP SP2)
Assigned to: CPU Architecture:Any

[17 Jan 2006 23:25] David Christian
Description:
I can successfully create a table that contains Japanese characters for the name and column.  The SHOW TABLE STATUS command returns the correct name for the table, however the SHOW CREATE TABLE command returns mojibake for the table and column names.

How to repeat:
Run the attached Unicode script to create the table and run the two SHOW commands.

Compare the results of the two different SHOW commands.
[17 Jan 2006 23:25] David Christian
Script to demonstrate the bug

Attachment: JapaneseTable.sql (application/octet-stream, text), 394 bytes.

[17 Jan 2006 23:26] David Christian
Screenshot that illustrates mojibake problem

Attachment: ShowCreateTable.png (image/x-png, text), 50.69 KiB.

[17 Jan 2006 23:27] David Christian
Screenshot that shows success of SHOW TABLE STATUS command

Attachment: ShowTableStatus.png (image/x-png, text), 55.37 KiB.

[17 Jan 2006 23:39] David Christian
This may be a problem in the Connector/.NET as I do not see the same issue in the MySQL Query Browser tool.
[18 Jan 2006 15:46] Valeriy Kravchuk
Thank you for a problem report. Please, specify the exact Connector/.NET version if you suspect it. Can you, please, also try to repeat with a newer version of MySQL server, 5.0.18, if you suspect server is the reason.
[18 Jan 2006 20:40] David Christian
I am testing with 1.0.7 of the Connector/.NET.  It is really easy to reproduce this problem.  Create the table I included in the script and then execute the "SHOW CREATE TABLE" command on the table with the Japanese table and column names.

Create a Windows Form application and drop a TextEdit, Grid and a button on it.  Attach code like this to the button_click:

    private void button2_Click(object sender, EventArgs e)
    {
      MySql.Data.MySqlClient.MySqlConnection conn = new MySql.Data.MySqlClient.MySqlConnection("User Id=root;Password=root;Host=localhost;Port=3307;Database=test");
      MySql.Data.MySqlClient.MySqlCommand cmd = new MySql.Data.MySqlClient.MySqlCommand(textBox1.Text);
      cmd.Connection = conn;

      MySql.Data.MySqlClient.MySqlDataAdapter adp = new MySql.Data.MySqlClient.MySqlDataAdapter(cmd);

      DataTable tbl = new DataTable();
      adp.Fill(tbl);
      gridControl1.DataSource = tbl;
    }
[23 Jan 2006 22:49] David Christian
I updated the category to reflect that the bug is in Connector/Net.  Any update on this issue?
[5 Apr 2006 8:34] Tonci Grgin
Hi. Can you please provide me with info on exact character set and collation used (i.e. SHOW VARIABLES LIKE 'char%').
[10 Apr 2006 20:56] David Christian
Wow, nearly 3 months since my last post and you are still asking me for input on this.  Here is the requested information, but for the record we have dumped the Connector.NET because of how poor response to bug reports is.  We are using a commercial product now and I don't even compile our application with your connector so I cannot actually verify a fix if you come up with one.  Perhaps some other customers will benefit from this bug report.

Variable_name	Value	
character_set_client	utf8	
character_set_connection	utf8	
character_set_database	utf8	
character_set_results	utf8	
character_set_server	utf8	
character_set_system	utf8	
character_sets_dir	C:\Program Files\MySQL\MySQL Server 5.0\share\charsets\
[15 Apr 2006 9:09] Tonci Grgin
It would be much easier if I didn't have to search bugs db for duplicates...
This is a duplicate of bug 10217 posted by same reporter which is set to Can't repeat. If I have any more comment's I'll post it there.