Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.1.44, 10.2.31, 10.3.22, 10.4.12
-
None
Description
The lower_case_table_names system variable supports the values 0, 1, and 2. We can tell from the source code:
static Sys_var_uint Sys_lower_case_table_names( |
"lower_case_table_names", |
"If set to 1 table names are stored in lowercase on disk and table " |
"names will be case-insensitive. Should be set to 2 if you are using " |
"a case insensitive file system", |
READ_ONLY GLOBAL_VAR(lower_case_table_names),
|
CMD_LINE(OPT_ARG, OPT_LOWER_CASE_TABLE_NAMES),
|
VALID_RANGE(0, 2),
|
#ifdef FN_NO_CASE_SENSE
|
DEFAULT(1),
|
#else
|
DEFAULT(0),
|
#endif
|
BLOCK_SIZE(1));
|
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:
MariaDB [(none)]> SELECT VARIABLE_COMMENT FROM information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='lower_case_table_names'; |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
| VARIABLE_COMMENT |
|
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
| If set to 1 table names are stored in lowercase on disk and table names will be case-insensitive. Should be set to 2 if you are using a case insensitive file system | |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |
1 row in set (0.002 sec) |
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?:
Should be set to 2 if you are using a case insensitive file system
That doesn't make sense when you look at the code. If you have a case-insensitive file system, then it defaults to 1:
#ifdef FN_NO_CASE_SENSE
|
DEFAULT(1),
|
Why is the code ignoring its own recommendation?
It appears that this usage message needs several fixes.
Attachments
Issue Links
- relates to
-
MDEV-21780 event_scheduler system variable's usage message doesn't mention the possible value "ORIGINAL"
- Open