summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
diff options
context:
space:
mode:
authorJulius Goryavsky <julius.goryavsky@mariadb.com>2020-05-12 13:29:17 +0200
committerJulius Goryavsky <julius.goryavsky@mariadb.com>2020-07-16 12:28:36 +0200
commitb3cae9db112d69e8472d4f965805db7c61a6c44c (patch)
tree4206206c089fad043d8117d0fb82632bc20b42a6 /sql/mysqld.cc
parent147d4b1ec0da85cd0f269b05c0e604bf7abc8753 (diff)
downloadmariadb-git-b3cae9db112d69e8472d4f965805db7c61a6c44c.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.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index afe969b6e8d..44f8558e474 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -4674,8 +4674,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)
@@ -4692,7 +4694,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);
}
}
@@ -4703,7 +4705,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