Bug #89874 lower_case_table_names=2 documentation error
Submitted: 1 Mar 2018 15:45 Modified: 6 Apr 2018 13:40
Reporter: Mark Rhoades Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:all OS:Any
Assigned to: CPU Architecture:Any
Tags: lower_case_table_names

[1 Mar 2018 15:45] Mark Rhoades
Description:
MySQL 5.7 Reference Manual (all versions)
Section 9.2.2 Identifier Case Sensitivity
lower_case_table_names=2 has an error in the description on how it works. It's basically backwards. The MySQL metadata keeps the case of of the CREATE TABLE or CREATE DATABASE. When you execute "Show tables" it lists the tables showing the case that was used in the CREATE TABLE statement. It is NOT like lower_case_table_names=1.

It currently reads:
Table and database names are stored on disk using the lettercase specified in the CREATE TABLE or CREATE DATABASE statement, but MySQL converts them to lowercase on lookup. Name comparisons are not case sensitive. This works only on file systems that are not case-sensitive! InnoDB table names are stored in lowercase, as for lower_case_table_names=1.

How to repeat:
Search for lower_case_table_names
[5 Mar 2018 15:39] MySQL Verification Team
Hi!

Thank you for your bug report.

Table and schema names depend also on the operating system that you use. 

On which OS have you noticed this behaviour ????

Do note that value of 2 is intended for the OS like macOS.
[5 Mar 2018 16:40] Mark Rhoades
This is on Windows.

Setting 2 is what we use with Windows when restoring a database from a Unix type OS which is case-sensitive and you need the tables to stay in the database meta-data in the proper case. Using tools that have SQL-completion will give the wrong case if setting 1 is used.
[6 Mar 2018 13:40] MySQL Verification Team
Hi!

Unfortunately, our Reference Manual is quite clear on the subject, in several places, including chapters 5.1.6 and 9.2.2. 

On Windows, only the value of 1 is supported. Value 2 will work on macOS.
[7 Apr 2018 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".