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:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user