summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThayumanavar <thayumanavar.x.sachithanantha@oracle.com>2012-07-25 16:24:18 +0530
committerThayumanavar <thayumanavar.x.sachithanantha@oracle.com>2012-07-25 16:24:18 +0530
commit436c0b04cb6c2163c558adef033518b01de8251c (patch)
treea09ce9505a707033a049de3e66f502fc0801bc5e /include
parenta0e448c4d44d6368e5dbe3f0a1159ba5f5c77b6f (diff)
downloadmariadb-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 'include')
-rw-r--r--include/mysql/thread_pool_priv.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/mysql/thread_pool_priv.h b/include/mysql/thread_pool_priv.h
index b4b68e6880d..d649655bb8e 100644
--- a/include/mysql/thread_pool_priv.h
+++ b/include/mysql/thread_pool_priv.h
@@ -35,6 +35,7 @@
#include <debug_sync.h>
#include <sql_profile.h>
#include <table.h>
+#include <sql_list.h>
/* Needed to get access to scheduler variables */
void* thd_get_scheduler_data(THD *thd);
@@ -56,9 +57,30 @@ void thd_unlock_data(THD *thd);
bool thd_is_transaction_active(THD *thd);
int thd_connection_has_data(THD *thd);
void thd_set_net_read_write(THD *thd, uint val);
+uint thd_get_net_read_write(THD *thd);
void thd_set_mysys_var(THD *thd, st_my_thread_var *mysys_var);
+ulong thd_get_net_wait_timeout(THD *thd);
my_socket thd_get_fd(THD *thd);
+/* Interface class for global thread list iteration */
+class Thread_iterator
+{
+ public:
+ Thread_iterator() : m_iterator(threads) {}
+ THD* next()
+ {
+ THD* tmp = m_iterator++;
+ return tmp;
+ }
+ private:
+ /*
+ Don't allow copying of this class.
+ */
+ Thread_iterator(const Thread_iterator&);
+ void operator=(const Thread_iterator&);
+ I_List_iterator<THD> m_iterator;
+};
+
/* Print to the MySQL error log */
void sql_print_error(const char *format, ...);