Reputation: 352
The MySQL documentation [1] explains the possibility of using case sensitive table names on all plattforms (by setting lower_case_table_names=0
on Unix and lower_case_table_names=2
on Windows)...with one exception:
Exception: If you are using InnoDB tables and you are trying to avoid these data transfer problems, you should set lower_case_table_names to 1 on all platforms to force names to be converted to lowercase.
My questions are:
[1] https://dev.mysql.com/doc/refman/5.7/en/identifier-case-sensitivity.html
Upvotes: 1
Views: 743
Reputation: 142298
CREATE TABLE abc (...); -- creates file `abc.frm`
CREATE TABLE ABC (...); -- creates file `ABC.frm`
If the OS (such as Windows) does not distinguish between abc.frm
and ABC.frm
, then those two tables cannot coexist. Similarly for databases.
Also, if you get sloppy and say both
SELECT ... FROM abc ...;
SELECT ... FROM Abc ...;
There can be confusion as to what table is desired. Hence, the setting also applies to use in queries.
Upvotes: 1