MySQL Lowercase Table Names: Server vs Data Dictionary Conflicts
When the lower_case_table_names setting for the server is set to '0' and the data dictionary is set to '1', it can cause conflicts in table name resolution between the server and the data dictionary.
In MySQL, the lower_case_table_names setting determines how the server handles table names that are not enclosed in quotes. A setting of '0' means that the server treats table names as case-sensitive, while a setting of '1' means that the server treats table names as case-insensitive.
When the data dictionary has a lower_case_table_names setting of '1', it means that all table names are stored in lowercase letters, regardless of how they were created or entered.
If the server has a lower_case_table_names setting of '0', it means that it will treat table names as case-sensitive, and will try to match the exact case of the table names in the queries it receives.
This can lead to conflicts when the server receives a query that includes a table name that was created with different casing than what is stored in the data dictionary. In this case, the server may not be able to find the table, and the query will fail.
To avoid these conflicts, it is recommended to set the lower_case_table_names setting to the same value for both the server and the data dictionary. If this is not possible, it is important to ensure that all table names are entered and referenced consistently, using the same casing throughout.
原文地址: https://www.cveoy.top/t/topic/owLk 著作权归作者所有。请勿转载和采集!