summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 6433786a079..8bb7adfd50a 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -1077,6 +1077,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();
@@ -1473,6 +1475,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;
}
@@ -1582,6 +1586,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;
+ }
+
killed= KILL_CONNECTION;
#ifdef ENABLE_WHEN_BINLOG_WILL_BE_ABLE_TO_PREPARE
if (transaction.xid_state.xa_state == XA_PREPARED)