diff options
Diffstat (limited to 'sql/sql_reload.cc')
-rw-r--r-- | sql/sql_reload.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/sql_reload.cc b/sql/sql_reload.cc index daacab46c05..3665b18eee2 100644 --- a/sql/sql_reload.cc +++ b/sql/sql_reload.cc @@ -30,6 +30,7 @@ #include "sql_show.h" #include "debug_sync.h" #include "des_key_file.h" +#include "transaction.h" static void disable_checkpoints(THD *thd); @@ -73,7 +74,7 @@ bool reload_acl_and_cache(THD *thd, unsigned long long options, If reload_acl_and_cache() is called from SIGHUP handler we have to allocate temporary THD for execution of acl_reload()/grant_reload(). */ - if (!thd && (thd= (tmp_thd= new THD))) + if (!thd && (thd= (tmp_thd= new THD(0)))) { thd->thread_stack= (char*) &tmp_thd; thd->store_globals(); @@ -602,6 +603,7 @@ bool flush_tables_with_read_lock(THD *thd, TABLE_LIST *all_tables) return FALSE; error_reset_bits: + trans_rollback_stmt(thd); close_thread_tables(thd); thd->variables.option_bits&= ~OPTION_TABLE_LOCK; error: |