Bug #64712 Store View Names in their written letter case when lower_case_table_names = 2
Submitted: 20 Mar 2012 20:39 Modified: 21 Mar 2012 18:19
Reporter: David Berg Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: DDL Severity:S4 (Feature request)
Version:5.0 - 5.6.4 OS:Windows (XP Pro SP3)
Assigned to: CPU Architecture:Any

[20 Mar 2012 20:39] David Berg
Description:
Case sensitivity for table names is regulated by the system variable lower_case_table_names. When lower_case_table_names is set to a value of '2', table names are stored exactly as written in the CREATE statment. (e.g. CREATE TABLE ProjectSummary ...; This is the expected behavior. I would naturally expect view names to follow the same paradigm.

However, view names are stored in lower case regardless of the setting for lower_case_table_names. E.g. CREATE VIEW v_ProjectSummary ...;) yields a view name of v_projectsummary, even when lower_case_table_names = 2. 

Could the value of view names follow the same paradigm as that for table names?

How to repeat:
Shut down the server.
SET lower_case_table_names = 2.
Bring up the server.

CREATE TABLE ProjectSummary (ID INTEGER);
CREATE VIEW v_ProjectSummary AS SELECT * FROM ProjectSummary;

SHOW TABLES;

Suggested fix:
Store view names in the letter case with which they are written in the CREATE statement when lower_case_table_names = 2.
[21 Mar 2012 7:04] Valeriy Kravchuk
This is a duplicate of bug #56751.
[21 Mar 2012 18:19] David Berg
Sorry, Valeriy. I always try to find existing reports of symptoms I find before reporting them myself. I just missed this one.