summaryrefslogtreecommitdiffstats
path: root/storage/perfschema/mysqld_thd_manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'storage/perfschema/mysqld_thd_manager.h')
-rw-r--r--storage/perfschema/mysqld_thd_manager.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/storage/perfschema/mysqld_thd_manager.h b/storage/perfschema/mysqld_thd_manager.h
new file mode 100644
index 00000000..fbb6f86a
--- /dev/null
+++ b/storage/perfschema/mysqld_thd_manager.h
@@ -0,0 +1,29 @@
+#ifndef STORAGE_PERFSCHEMA_MYSQL_THD_MANAGER_INCLUDED
+#define STORAGE_PERFSCHEMA_MYSQL_THD_MANAGER_INCLUDED
+#include "my_global.h"
+#include "my_thread.h"
+
+class Find_THD_Impl
+{
+ public:
+ virtual ~Find_THD_Impl() {}
+ virtual bool operator()(THD *thd) = 0;
+};
+
+class Do_THD_Impl
+{
+ public:
+ virtual ~Do_THD_Impl() {}
+ virtual void operator()(THD*) = 0;
+};
+
+class Global_THD_manager
+{
+ public:
+ static Global_THD_manager* get_instance();
+ THD* find_thd(Find_THD_Impl *func);
+ void do_for_all_thd(Do_THD_Impl *arg);
+};
+
+ulong get_system_variable_hash_records(void);
+#endif