summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Black <daniel@mariadb.org>2022-10-28 19:59:35 +1100
committerGitHub <noreply@github.com>2022-10-28 09:59:35 +0100
commit4ebc8d8c27446f884feb3d4771b0685e333f2892 (patch)
treee7187e4313b81c56934df60860a35e007703f72f
parent899cedb33c8e92a0067f2d74015300454c6235ae (diff)
downloadmariadb-git-4ebc8d8c27446f884feb3d4771b0685e333f2892.tar.gz
MDEV-29847: Wrong warning on rlimit capping of max_open_files (#2315)
Per the code my_set_max_open_files 3 lines earlier, we attempt to set the nofile (number of open files), rlimit to max_open_files. We should use this in the warning because wanted_files may not be the number.
-rw-r--r--sql/mysqld.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 5d58d42faf9..84c3b9fb0a6 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -4580,8 +4580,8 @@ static int init_common_variables()
files= my_set_max_open_files(max_open_files);
SYSVAR_AUTOSIZE_IF_CHANGED(open_files_limit, files, ulong);
- if (files < wanted_files && global_system_variables.log_warnings)
- sql_print_warning("Could not increase number of max_open_files to more than %u (request: %u)", files, wanted_files);
+ if (files < max_open_files && global_system_variables.log_warnings)
+ sql_print_warning("Could not increase number of max_open_files to more than %u (request: %u)", files, max_open_files);
/* If we required too much tc_instances than we reduce */
SYSVAR_AUTOSIZE_IF_CHANGED(tc_instances,