1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.
This commit is contained in:
Thayumanavar
2012-07-25 16:24:18 +05:30
parent a0e448c4d4
commit 436c0b04cb
2 changed files with 45 additions and 0 deletions

View File

@ -254,6 +254,18 @@ PSI_thread *thd_get_psi(THD *thd)
return thd->scheduler.m_psi;
}
/**
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
@ -422,6 +434,17 @@ void thd_set_net_read_write(THD *thd, uint val)
thd->net.reading_or_writing= 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