summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2020-02-10 20:34:16 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2020-02-10 20:34:16 +0100
commit58b70dc13630d2f2f0244359d6351085d70fd5dd (patch)
treebf6600084f6bce9526916a307d0263d398451b0b /sql
parentd72038a738b2ece7f50453e0f366ad0b9e5ed7e0 (diff)
parent235d7c6f541ef00bec8759bef7d9e1764db20755 (diff)
downloadmariadb-git-58b70dc13630d2f2f0244359d6351085d70fd5dd.tar.gz
Merge branch '10.2' into 10.3
Diffstat (limited to 'sql')
-rw-r--r--sql/mysqld.cc14
-rw-r--r--sql/sql_parse.cc1
-rw-r--r--sql/table.cc1
3 files changed, 11 insertions, 5 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 8fe6e6b6d32..60b87b60be4 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -4495,7 +4495,7 @@ static int init_common_variables()
min_connections= 10;
/* MyISAM requires two file handles per table. */
wanted_files= (extra_files + max_connections + extra_max_connections +
- tc_size * 2);
+ tc_size * 2 * tc_instances);
#if defined(HAVE_POOL_OF_THREADS) && !defined(__WIN__)
// add epoll or kevent fd for each threadpool group, in case pool of threads is used
wanted_files+= (thread_handling > SCHEDULER_NO_THREADS) ? 0 : threadpool_size;
@@ -4524,6 +4524,14 @@ static int init_common_variables()
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 we required too much tc_instances than we reduce */
+ SYSVAR_AUTOSIZE_IF_CHANGED(tc_instances,
+ (uint32) MY_MIN(MY_MAX((files - extra_files -
+ max_connections)/
+ 2/tc_size,
+ 1),
+ tc_instances),
+ uint32);
/*
If we have requested too much file handles than we bring
max_connections in supported bounds. Still leave at least
@@ -4531,7 +4539,7 @@ static int init_common_variables()
*/
SYSVAR_AUTOSIZE_IF_CHANGED(max_connections,
(ulong) MY_MAX(MY_MIN(files- extra_files-
- min_tc_size*2,
+ min_tc_size*2*tc_instances,
max_connections),
min_connections),
ulong);
@@ -4544,7 +4552,7 @@ static int init_common_variables()
*/
SYSVAR_AUTOSIZE_IF_CHANGED(tc_size,
(ulong) MY_MIN(MY_MAX((files - extra_files -
- max_connections) / 2,
+ max_connections) / 2 / tc_instances,
min_tc_size),
tc_size), ulong);
DBUG_PRINT("warning",
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index db38a20ea8a..59b4e148005 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -1858,7 +1858,6 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
while (!thd->killed && (parser_state.m_lip.found_semicolon != NULL) &&
! thd->is_error())
{
- thd->get_stmt_da()->set_skip_flush();
/*
Multiple queries exist, execute them individually
*/
diff --git a/sql/table.cc b/sql/table.cc
index cbf26031658..5fc05bf34b1 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -4251,7 +4251,6 @@ bool check_column_name(const char *name)
been opened.
@param[in] table The table to check
- @param[in] table_f_count Expected number of columns in the table
@param[in] table_def Expected structure of the table (column name
and type)