Not long ago, there was a small question about MySQL's lower_case_table_names parameters:
1.lower_case_table_names is the table name ignoring case or all objects (fields, indexes, etc.) ignored?
2. Case-sensitive table (with uppercase, lowercase) migrated to a context-insensitive environment what would happen?
3. Tables in case-insensitive environments (tables built with uppercase and lowercase table name statements) migrated to a case-sensitive environment.
4.lower_case_table _names Set Why is the value better?
So I did a little experiment on these problems, first attached to the experimental conclusion.
Experimental conclusion:
1, lower_case_table_names only the table name, does not function the field name (field name case can be detected results);
2, in a case-insensitive environment, the capitalization of the table statements will be converted to lowercase table names, use uppercase table names can be located to the table (table name case is no difference, will be converted to lowercase), in case-insensitive environment tables are migrated to context-sensitive, table names are lowercase;
3, in the case-sensitive environment, the capital table name of the table name is built in uppercase, using the small write table name to build a table statement named lowercase, uppercase tables in a case-sensitive environment is migrated to a Case-insensitive environment, There is no error in the previously built capitalization table name Table report!
4, comprehensive and 2, 3 experimental conclusion, it is recommended to set this parameter value to 1, that is: Table name is not case-sensitive
Report:
Today, a lower-case-table-name=1 is encountered to modify a test environment, which causes the capitalization table name to be queried.
WORKAROUND: Rebuild the table
Effects of table names ignoring case settings in MySQL Library