[MDEV-21782] lower_case_table_names system variable's usage message needs several fixes Created: 2020-02-19 Updated: 2023-04-27 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Variables |
| Affects Version/s: | 10.1.44, 10.2.31, 10.3.22, 10.4.12 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Ian Gilfillan |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
The lower_case_table_names system variable supports the values 0, 1, and 2. We can tell from the source code:
https://github.com/MariaDB/server/blob/mariadb-10.4.12/sql/sys_vars.cc#L1462 We can see that the usage message only mentions the values 1 and 2:
The message should also mention the value 0, and it should mention why that value would be used. The message should also explain more about what the value 2 does. It currently explains absolutely nothing about it, other than "you should use it." On another strange note, why does the usage message make this claim?:
That doesn't make sense when you look at the code. If you have a case-insensitive file system, then it defaults to 1:
Why is the code ignoring its own recommendation? It appears that this usage message needs several fixes. |
| Comments |
| Comment by Anel Husakovic [ 2020-02-20 ] | ||||||||||||||||||||
|
Why are documentation of mariadb KB (added before 6 yeaars 9 months revision) and enterprise different? greenman | ||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2020-02-20 ] | ||||||||||||||||||||
|
anel,
The system variable reference in the Enterprise Documentation was automatically extracted from the usage message in the server that this Jira issue is referring to. The usage message in the server says this:
And the Enterprise Documentation says this:
You can see that they are exactly the same. In my opinion, this usage message should be improved. It is missing a lot of information. | ||||||||||||||||||||
| Comment by Ian Gilfillan [ 2020-02-20 ] | ||||||||||||||||||||
|
The description from the KB can be used here. | ||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2020-02-20 ] | ||||||||||||||||||||
I don't think the description from the KB can be used as-is. As far as I can tell, that description has some inaccuracies and omissions, so it would probably have to be fixed. For example, it says this about lower_case_table_names=2:
As far as I can tell, it is not true that this is the default value on Mac OS X. The source code only lists two default values:
So if the OS is case sensitive, then the default value will be 0. If the OS is case insensitive, then the default value will be 1. There is no condition here that says that the default value would be 2 on Mac OS X. Am I missing something, or is the KB incorrect about this? And for another example, the description from the KB also does not point out that lower_case_table_names=2 is totally invalid on Linux if the file system is case sensitive. If you try to set that value, then you will get a warning in the error log like the following, and your choice will be overridden:
| ||||||||||||||||||||
| Comment by Geoff Montee (Inactive) [ 2020-03-12 ] | ||||||||||||||||||||
|
For this reference to Mac OS X's default:
Is it referring to this block of code?:
https://github.com/MariaDB/server/blob/mariadb-10.4.12/sql/mysqld.cc#L4431 If so, then I think it would be more accurate to describe it like this:
|