Effects of table names ignoring case settings in MySQL Library

Source: Internet
Author: User
Tags lowercase

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.