Bug #17661 information_schema.SCHEMATA returns uppercase with lower_case_table_names = 1
Submitted: 23 Feb 2006 7:50 Modified: 9 Jun 2006 16:18
Reporter: Sebastian Mendel (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Information schema Severity:S2 (Serious)
Version:5.0.18 OS:Windows (Windows)
Assigned to: Sergei Glukhov CPU Architecture:Any

[23 Feb 2006 7:50] Sebastian Mendel
Description:
MySQL server 5.0.18 with latest PHP/Connector (5.0.18) and PHP 5.1.2

with lower_case_table_names = 1 (default)

different cases for SCHEMA name returned from information_schema

information_schema.SCHEMATA gives `Test`
information_schema.TABLES gives `test`

to (re)produce this i renamed the directory in the filesystem after creating `Test` from 'test' to 'Test' (as MySQL creates all databases in lowercase with lower_case_table_names = 1) - i need to do this to reproduce a bug reporting for phpMyAdmin

https://sourceforge.net/tracker/index.php?func=detail&aid=1436171&group_id=23067&atid=3774...

How to repeat:
create database `Test`
rename directory 'test' to 'Test'

SELECT * FROM information_schema.SCHEMATA
SELECT * FROM information_schema.TABLES

Suggested fix:
return information_schema.SCHEMATA in lowercase
[24 Feb 2006 11:19] Valeriy Kravchuk
Thank you for a problem report. Verified just as described. Looks like a result of "hack", but different results from different tables in INFORMATION_SCHEMA is surely a bug.
[1 Mar 2006 17:42] Mark Walker
I confirm that this problem also exists for Mac OSX (using MySQL 5.0.18-standard on OSX 10.4.5).
[23 Mar 2006 12:40] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/4063
[27 Mar 2006 12:34] Alexander Barkov
The patch looks ok to push.
[26 May 2006 11:38] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/6905
[2 Jun 2006 13:28] Alexander Barkov
Looks ok to push.
[6 Jun 2006 6:18] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/7306
[6 Jun 2006 6:26] Sergei Glukhov
Fixed in 5.0.23
[9 Jun 2006 16:18] Paul DuBois
Noted in 5.0.23 changelog.

Results from INFORMATION_SCHEMA.SCHEMATA could contain uppercase
information when lower_case_table_names was not 0.