Description:
Views are always created lowercase in OS X.
How to repeat:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1761 to server version: 5.0.27-standard
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show variables like 'vers%';
+-------------------------+------------------------------------------+
| Variable_name | Value |
+-------------------------+------------------------------------------+
| version | 5.0.27-standard |
| version_comment | MySQL Community Edition - Standard (GPL) |
| version_compile_machine | powerpc |
| version_compile_os | apple-darwin8.6.0 |
+-------------------------+------------------------------------------+
4 rows in set (0.00 sec)
mysql> show variables like '%case%';
+------------------------+-------+
| Variable_name | Value |
+------------------------+-------+
| lower_case_file_system | ON |
| lower_case_table_names | 2 |
+------------------------+-------+
2 rows in set (0.02 sec)
mysql> create database case_test;
Query OK, 1 row affected (0.00 sec)
mysql> use case_test;
Database changed
mysql> CREATE TABLE Mixed_Case_Table (`a` INTEGER UNSIGNED);
Query OK, 0 rows affected (0.02 sec)
mysql> CREATE VIEW Mixed_Case_View AS SELECT CURRENT_DATE();
Query OK, 0 rows affected (0.00 sec)
mysql> show tables;
+---------------------+
| Tables_in_case_test |
+---------------------+
| Mixed_Case_Table |
| mixed_case_view |
+---------------------+
2 rows in set (0.00 sec)
Suggested fix:
View creation on this platform doesn't seem to respect lower_case_table_names variable.