Bug #10883 foreign key constraint table references are lowercase
Submitted: 26 May 2005 16:02 Modified: 26 May 2005 16:49
Reporter: [ name withheld ]
Status: To be fixed later
Category:Server: InnoDB Severity:S2 (Serious)
Version:4.1.10-nt OS:Microsoft Windows (Windows XP Home)
Assigned to: Heikki Tuuri Target Version:

[26 May 2005 16:02] [ name withheld ]
Description:
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.

Example:

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 16:49] Heikki Tuuri
Hi!

This is a known problem. We would need a function

get_real_case_of_database_name_and_table_name()

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

Regards,

Heikki
[16 Oct 2008 17: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 17: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!