diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2020-07-28 15:59:38 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2020-07-30 10:17:45 +0200 |
commit | 71015d844e3f25a0c4eada9827a1dad464a4fdce (patch) | |
tree | 559fad43bb05477098b15df4476c5ccfd3135c0d /sql/sys_vars.cc | |
parent | 34f2be3b296fdd5933687eda9c3ef3ba9f707261 (diff) | |
download | mariadb-git-71015d844e3f25a0c4eada9827a1dad464a4fdce.tar.gz |
MDEV-21101 unexpected wait_timeout with pool-of-threads
Due to restricted size of the threadpool, execution of client queries can
be delayed (queued) for a while. This delay was interpreted as client
inactivity, and connection is closed, if client idle time + queue time
exceeds wait_timeout.
But users did not expect queue time to be included into wait_timeout.
This patch changes the behavior. We don't close connection anymore,
if there is some unread data present on connection,
even if wait_timeout is exceeded. Unread data means that client
was not idle, it sent a query, which we did not have time to process yet.
Diffstat (limited to 'sql/sys_vars.cc')
-rw-r--r-- | sql/sys_vars.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 120fb87ab50..b096c8c5a12 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -3609,6 +3609,12 @@ static bool fix_tp_min_threads(sys_var *, THD *, enum_var_type) static bool check_threadpool_size(sys_var *self, THD *thd, set_var *var) { + +#ifdef _WIN32 + if (threadpool_mode != TP_MODE_GENERIC) + return false; +#endif + ulonglong v= var->save_result.ulonglong_value; if (v > threadpool_max_size) { |