Bug #10883 foreign key constraint table references are lowercase
Submitted: 26 May 2005 14:02 Modified: 16 Jan 2014 2:51
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:4.1.10-nt OS:Windows (Windows XP Home)
Assigned to: Heikki Tuuri CPU Architecture:Any

[26 May 2005 14:02] [ name withheld ]
Table references in foreign key constraints are always lowercase, even when the referenced table is mixed case. This is a problem when exporting a database from a Windows MySQL server to a Unix MySQL server.


CONSTRAINT `0_88830` FOREIGN KEY (`internalUserID`) REFERENCES `internaluser` (`internalUserID`)

It should be:

CONSTRAINT `0_88830` FOREIGN KEY (`internalUserID`) REFERENCES `internalUser` (`internalUserID`)

That is, "internaluser" should be "internalUser".

How to repeat:
Create a mixed-case InnoDB table in a Windows. Create another table and create a foreign key to the first table. Look at the table create info.
[26 May 2005 14:49] Heikki Tuuri

This is a known problem. We would need a function


in MySQL, so that we could output them in the right case.


[16 Oct 2008 15:21] Mirko Geest
I'm using MySql 5.0.51 Community and the references are still stored in lowercase. To load data to a linux server I make a backup, rewrite all the referenced tables to uppercase and then restore it on the destination server. Really annoying.
[26 Mar 2009 16:28] Robert Cesaric
Using MySQL 5.1.30 Community and still noticing this bug.

Makes local Windows testing a pain an enormous pain.  It also causes MySQL Workbench SE errors during Database Synchronization that render it useless.

An fix for this would be greatly appreciated!
[19 Oct 2010 9:05] Marco Nobler
Hi All,

i'm using MySQL 5.1.41 in Windows and still noticing this bug.
Anyone knows about a possible fix?

[16 Jan 2014 2:51] Jimmy Yang
Please take a look at http://bugs.mysql.com/bug.php?id=55222 and see lower_case_table_names = 2 would help you address the problem