summaryrefslogtreecommitdiff
path: root/sql/threadpool.h
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2020-07-28 15:59:38 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2020-07-30 10:17:45 +0200
commit71015d844e3f25a0c4eada9827a1dad464a4fdce (patch)
tree559fad43bb05477098b15df4476c5ccfd3135c0d /sql/threadpool.h
parent34f2be3b296fdd5933687eda9c3ef3ba9f707261 (diff)
downloadmariadb-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/threadpool.h')
-rw-r--r--sql/threadpool.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/threadpool.h b/sql/threadpool.h
index d41435a766c..ec320c6945c 100644
--- a/sql/threadpool.h
+++ b/sql/threadpool.h
@@ -74,6 +74,7 @@ enum TP_STATE
{
TP_STATE_IDLE,
TP_STATE_RUNNING,
+ TP_STATE_PENDING
};
/*