Bug #60618 ALTER TABLE causes table's name to loose capital letters
Submitted: 24 Mar 2011 11:05 Modified: 19 Jul 2012 20:10
Reporter: Hector G Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.33 OS:MacOS
Assigned to: CPU Architecture:Any
Tags: ALTER TABLE, capitals, name

[24 Mar 2011 11:05] Hector G
Description:
Scenario: a table with a name containing capital letters (as in "newTable")

Any Alter Table operation (changing columns, indexes...) makes the name lower-case.

To fix it, I have to enter Alter Table again, choose a different name (otherwise it won't allow me), apply and then write the right name (with capital letters) and it will work.

How to repeat:
Altering a table (with this kind of name) by right-clicking on it and choosing "Alter Table..."

Then, edit anything (eg: a column) and apply.

The table's name will be lower-case

Suggested fix:
In a previous version tables with capital letters were impossible to alter, it just didn't display anything.

Now it allows the user to alter it, but destroys the name. Looks like the Workbench doesn't like names with capital letters, hope you fix this soon, as it's a bit ennoying! :)
[24 Mar 2011 13:46] Valeriy Kravchuk
Please, send the output of:

show variables like 'lower_case%';

from the server you are working with.
[24 Mar 2011 14:47] Hector G
Hi Valeriy, here you are:

lower_case_file_system = ON
lower_case_table_names = 2
[24 Mar 2011 15:27] Peter Laursen
Same on Windows with 'lower_case_table_names' = 2 setting.

The ALTER TABLE dialog only displays lowercases for mixed-case tables.
[24 Mar 2011 17:23] Valeriy Kravchuk
Thank you for the bug report. Verified on Mac OS X while working with local 5.1.57. 

By the way, same Workbench version works OK with local MySQL server 5.0.93.
[24 Mar 2011 18:11] Hector G
I've upgraded my Mac OS x86 64bit MySQL server from 5.1.52 to 5.5.10 and I'm still having trouble with this.

I've created a table with mixed-case letters on its name. Ok. Then I try to alter it: the dialog displays its name on lower-case letters. If I change this name to match the original one it displays a name conflict error (with the same table). I must leave it in lower-case letters to continue to the SQL script review screen.

In addition, the generated script references to the table in lower-case letters, although it is still displayed with mixed-case letters on the Schemas list. If I cancel the ALTER operation and refresh the list the name is still in mixed-case letters. If I execute the script and refresh the list, the name of the table has changed to lower-case letters.

For the record: I've tested it with a remote Linux server (production) running MySQL community server 5.0.82sp1 and it works fine.
[14 Apr 2011 2:52] Alfredo Kojima
this is caused by bug #57830 from server
[19 Jul 2012 20:10] Philip Olson
This has been fixed as of the soon-to-be-released Workbench 5.2.41, and 
here's the changelog entry:

MySQL Workbench now respects case-sensitivity when "lower_case_table_names"
= 2.