diff options
author | Julius Goryavsky <julius.goryavsky@mariadb.com> | 2020-05-12 13:29:17 +0200 |
---|---|---|
committer | Julius Goryavsky <julius.goryavsky@mariadb.com> | 2020-07-16 12:17:01 +0200 |
commit | 4412a461a1eb5e061dcbf3bdd935f7eef01bfeb5 (patch) | |
tree | a2b2b695c3e5bdb14fc0472795533ed29023ba71 /sql/mysqld.cc | |
parent | 7473e1841c630d86f1873a2a7afacb53955b3f6f (diff) | |
download | mariadb-git-4412a461a1eb5e061dcbf3bdd935f7eef01bfeb5.tar.gz |
MDEV-20401: Server incorrectly auto-sets lower_case_file_system value
Server auto-sets lower_case_file_system value based on default
datadir's behavior instead of instead of using the directory specified
by the user through the configuration file or command line options.
This patch fixes this problem.
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r-- | sql/mysqld.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 594f50b72f2..6a5162e2f03 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -4538,8 +4538,10 @@ static int init_common_variables() get corrupted if accesses with names of different case. */ DBUG_PRINT("info", ("lower_case_table_names: %d", lower_case_table_names)); + if(mysql_real_data_home_ptr == NULL || *mysql_real_data_home_ptr == 0) + mysql_real_data_home_ptr= mysql_real_data_home; SYSVAR_AUTOSIZE(lower_case_file_system, - test_if_case_insensitive(mysql_real_data_home)); + test_if_case_insensitive(mysql_real_data_home_ptr)); if (!lower_case_table_names && lower_case_file_system == 1) { if (lower_case_table_names_used) @@ -4556,7 +4558,7 @@ static int init_common_variables() { if (global_system_variables.log_warnings) sql_print_warning("Setting lower_case_table_names=2 because file " - "system for %s is case insensitive", mysql_real_data_home); + "system for %s is case insensitive", mysql_real_data_home_ptr); SYSVAR_AUTOSIZE(lower_case_table_names, 2); } } @@ -4567,7 +4569,7 @@ static int init_common_variables() sql_print_warning("lower_case_table_names was set to 2, even though your " "the file system '%s' is case sensitive. Now setting " "lower_case_table_names to 0 to avoid future problems.", - mysql_real_data_home); + mysql_real_data_home_ptr); SYSVAR_AUTOSIZE(lower_case_table_names, 0); } else |