Bug #50 SHOW TABLE STATUS doesn't respect --lower-case-table-names
Submitted: 29 Jan 2003 16:14 Modified: 29 Jan 2003 16:15
Reporter: Michael Widenius Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:3.23 and up OS:Windows (Windows)
Assigned to: Michael Widenius CPU Architecture:Any

[29 Jan 2003 16:14] Michael Widenius
Description:
SHOW TABLE STATUS doesn't respect --lower-case-table-names

This causes the following problems:

If one is running with --lower-case-table-names and issued a
SWOW TABLE STATUS and you had files or database with upper case characters
(maybe from running without --lower-case-table-names) then MySQL will
insert the table in mixed case into the table cache and will not be able
to detect that the table is open in DROP DATABASE, DROP TABLE or ALTER TABLE but one would get error 13 (permission denied) when trying to drop the table.

How to repeat:
create database with name FOO
start mysqld with --lower-case-table-names

Issue the queries:

CREATE TABLE foo.test (a int);
SHOW TABLE STATUS FROM FOO;
DROP DATABASE FOO;

This would give an error 13 for the table test as it was not correctly inserted into table_cache.

Suggested fix:
Convert databases and tables to lower cases before starting mysqld with
--lower-case-table-names.
[29 Jan 2003 16:15] MySQL Developer
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at 
http://www.mysql.com/downloads/

Fixed in 4.0.10 and 3.23.56