roger wrote:
> We have a strange problem reported from one of our
> users using DbVisualizer.
>
> 1) The problem appears when running the MySQL DB
> on Mac OS X. All table names in the actual
> database starts with an uppercase letter i.e
> Brand, Client, etc. If we now execute
> DatabaseMetaData.getImportedKeys() then it gives
> the following result with all letters in the the
> PKTABLE_NAME column in lowercase while the
> FKTABLE_NAME shows the correct spelling.
>
> PKTABLE_NAME
> -------------------
> account
> account_notes
> analytic
> brand
> client
>
> FKTABLE_NAME
> -------------------
> Account
> Account_Notes
> Analytic
> Brand
> Client
>
> 2) Running the very same MySQL DB on a Linux box
> using the same JDBC version gives the following
> correct result:
>
> PKTABLE_NAME
> -------------------
> Account
> Account_Notes
> Analytic
> Brand
> Client
>
> FKTABLE_NAME
> -------------------
> Account
> Account_Notes
> Analytic
> Brand
> Client
>
> Why this deviation?
>
> Roger Bjarevall
> Minq Software
Roger,
The driver basically parses the output of 'SHOW CREATE TABLE' (at least until all of INFORMATION_SCHEMA will be implemented in MySQL-5.0). I'd have to see the output of that command for each of the tables in question. My guess is that the server isn't being consistent with the capitalization between the tables and the foreign key constraints it writes out as a response to the command.
-Mark
Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools
Oracle
http://www.mysql.com/products/enterprise/monitor.html