diff options
author | Thayumanavar <thayumanavar.x.sachithanantha@oracle.com> | 2012-07-25 16:24:18 +0530 |
---|---|---|
committer | Thayumanavar <thayumanavar.x.sachithanantha@oracle.com> | 2012-07-25 16:24:18 +0530 |
commit | 436c0b04cb6c2163c558adef033518b01de8251c (patch) | |
tree | a09ce9505a707033a049de3e66f502fc0801bc5e /sql/sql_class.cc | |
parent | a0e448c4d44d6368e5dbe3f0a1159ba5f5c77b6f (diff) | |
download | mariadb-git-436c0b04cb6c2163c558adef033518b01de8251c.tar.gz |
Bug#13699303 - THREAD POOL PLUGIN IGNORES TIMEOUT.
PROBLEM:
mysql provides a feature where in a session which is
idle for a period specified by the wait_timeout variable
(whose value is in seconds), the session is closed
This feature is not present when we use thread pool.
FIX:
This patch implements the interface functions which is
required to implement the wait_timeout functionality
in the thread pool plugin.
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 8931d67dd25..b0d7cac1864 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -255,6 +255,18 @@ PSI_thread *thd_get_psi(THD *thd) } /** + Get net_wait_timeout for THD object + + @param thd THD object + + @retval net_wait_timeout value for thread on THD +*/ +ulong thd_get_net_wait_timeout(THD* thd) +{ + return thd->variables.net_wait_timeout; +} + +/** Set reference to Performance Schema object for THD object @param thd THD object @@ -423,6 +435,17 @@ void thd_set_net_read_write(THD *thd, uint val) } /** + Get reading/writing on socket from THD object + @param thd THD object + + @retval net.reading_or_writing value for thread on THD. +*/ +uint thd_get_net_read_write(THD *thd) +{ + return thd->net.reading_or_writing; +} + +/** Set reference to mysys variable in THD object @param thd THD object |