diff options
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 02f49b6d645..7f0c2e7d891 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -952,6 +952,8 @@ THD::THD(my_thread_id id, bool is_wsrep_applier) prepare_derived_at_open= FALSE; create_tmp_table_for_derived= FALSE; save_prep_leaf_list= FALSE; + bundle_command.str= NULL; + bundle_command.length= 0; /* Restore THR_THD */ set_current_thd(old_THR_THD); inc_thread_count(); @@ -1364,6 +1366,8 @@ void THD::init(void) #endif //EMBEDDED_LIBRARY apc_target.init(&LOCK_thd_data); + bundle_command.str= NULL; + bundle_command.length= 0; DBUG_VOID_RETURN; } @@ -1486,6 +1490,13 @@ void THD::cleanup(void) DBUG_ENTER("THD::cleanup"); DBUG_ASSERT(cleanup_done == 0); + if (bundle_command.str) + { + my_free(bundle_command.str); + bundle_command.str= 0; + bundle_command.length= 0; + } + set_killed(KILL_CONNECTION); #ifdef ENABLE_WHEN_BINLOG_WILL_BE_ABLE_TO_PREPARE if (transaction.xid_state.xa_state == XA_PREPARED) |