summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 4dea3acc5e7..76602e00074 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -315,6 +315,27 @@ typedef enum enum_diag_condition_item_name
*/
extern const LEX_STRING Diag_condition_item_names[];
+/**
+ Query_cache_tls -- query cache thread local data.
+*/
+
+class Query_cache_block;
+
+struct Query_cache_tls
+{
+ /*
+ 'first_query_block' should be accessed only via query cache
+ functions and methods to maintain proper locking.
+ */
+ Query_cache_block *first_query_block;
+ void set_first_query_block(Query_cache_block *first_query_block_arg)
+ {
+ first_query_block= first_query_block_arg;
+ }
+
+ Query_cache_tls() :first_query_block(NULL) {}
+};
+
#include "sql_lex.h" /* Must be here */
class Delayed_insert;
@@ -1240,6 +1261,9 @@ public:
*/
struct st_mysql_stmt *current_stmt;
#endif
+#ifdef HAVE_QUERY_CACHE
+ Query_cache_tls query_cache_tls;
+#endif
NET net; // client connection descriptor
Protocol *protocol; // Current protocol
Protocol_text protocol_text; // Normal protocol