diff options
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index 03a92c1a685..0f7d9d9a8d5 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -25,6 +25,7 @@ #include "log.h" #include "rpl_tblmap.h" +#include "mdl.h" class Reprepare_observer; @@ -976,26 +977,31 @@ public: */ uint state_flags; + MDL_CONTEXT mdl_context; + MDL_CONTEXT handler_mdl_context; + /* This constructor serves for creation of Open_tables_state instances which are used as backup storage. */ Open_tables_state() : state_flags(0U) { } - Open_tables_state(ulong version_arg); + Open_tables_state(THD *thd, ulong version_arg); void set_open_tables_state(Open_tables_state *state) { *this= *state; } - void reset_open_tables_state() + void reset_open_tables_state(THD *thd) { open_tables= temporary_tables= handler_tables= derived_tables= 0; extra_lock= lock= locked_tables= 0; prelocked_mode= NON_PRELOCKED; state_flags= 0U; m_reprepare_observer= NULL; + mdl_context_init(&mdl_context, thd); + mdl_context_init(&handler_mdl_context, thd); } }; @@ -1809,6 +1815,9 @@ public: struct st_debug_sync_control *debug_sync_control; #endif /* defined(ENABLED_DEBUG_SYNC) */ + MEM_ROOT *mdl_el_root; + MEM_ROOT locked_tables_root; + THD(); ~THD(); |