MySQL on Windows - case sensitivity of identifiers incorrect
Posted by: Andy Jefferson
Date: June 23, 2005 12:37PM

Hi,
not sure if this has been fixed in a recent mysql-connector-java release but I'll relay the issue that a user of a JDO implementation (JPOX) that i'm developing has found.

He is using MySQL 4.0.22 on Windows NT using 3.0.14 mysql-connector-java. In JPOX we rely on the results of DatabaseMetaData to generate CREATE TABLE statements. We also use the output from DatabaseMetaData.getColumns() to validate the existence of the users required tables.

The issue is that DatabaseMetaData.storesMixedCaseIdentifiers() returns true, yet DatabaseMetaData.storesLowerCaseIdentifiers() returns false. As a result we generate the users tables in "MixedCase" - so allowing capitals. Our CREATE TABLE statements are accepted, yet MySQL server is creating the tables in lower case (presumably because Windows cant provide case sensitivity).

We then call DatabaseMetaData.getColumns() and try to find the table that the user created earlier. It doesnt exist in the same case as what we specified - its now in lowercase. I interpret this as a bug in mysql-connector-java since the Windows server that mysql-connector-java is connected to does NOT support MixedCase, it supports lowercase.


JPOX supports MySQL on Windows *and* Unix and so it is not feasible for us to have to check upper and lower combinations of table names (on Unix we could have a table called "MyTable" AND a table called "mytable" in the same catalog).

1. Has this been fixed in a more recent version of mysql-connector-java that our user is using ? (apologies for not trying it myself but I dont use Windows and so cant verify what other versions of the JDBC driver does. I've asked him to give them a try).
2. If not, can it be registered as a bug ?

Thanks in advance

Options: ReplyQuote


Subject
Written By
Posted
MySQL on Windows - case sensitivity of identifiers incorrect
June 23, 2005 12:37PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.