diff options
author | Alexander Barkov <bar@mariadb.org> | 2018-02-08 19:06:25 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2018-02-08 19:06:25 +0400 |
commit | 3cad31f2a758f797ef0acac5625d0e007ecbce93 (patch) | |
tree | 73c054636c4858b2a51eddf7eaa653746d67524e /sql/sql_class.cc | |
parent | 560b9895d413bdfedda0a0ca871a635858990c05 (diff) | |
parent | 5c057b3fef3aa92cfadbd63043799b430132a494 (diff) | |
download | mariadb-git-3cad31f2a758f797ef0acac5625d0e007ecbce93.tar.gz |
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index c5c29e4efbc..1cd9cd19a7b 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -785,6 +785,12 @@ THD::THD(my_thread_id id, bool is_wsrep_applier) init_sql_alloc(&main_mem_root, "THD::main_mem_root", ALLOC_ROOT_MIN_BLOCK_SIZE, 0, MYF(MY_THREAD_SPECIFIC)); + /* + Allocation of user variables for binary logging is always done with main + mem root + */ + user_var_events_alloc= mem_root; + stmt_arena= this; thread_stack= 0; scheduler= thread_scheduler; // Will be fixed later @@ -2770,6 +2776,9 @@ Item_change_list::check_and_register_item_tree_change(Item **place, MEM_ROOT *runtime_memroot) { Item_change_record *change; + DBUG_ENTER("THD::check_and_register_item_tree_change"); + DBUG_PRINT("enter", ("Register: %p (%p) <- %p (%p)", + *place, place, *new_value, new_value)); I_List_iterator<Item_change_record> it(change_list); while ((change= it++)) { @@ -2779,6 +2788,7 @@ Item_change_list::check_and_register_item_tree_change(Item **place, if (change) nocheck_register_item_tree_change(place, change->old_value, runtime_memroot); + DBUG_VOID_RETURN; } @@ -2786,17 +2796,13 @@ void Item_change_list::rollback_item_tree_changes() { I_List_iterator<Item_change_record> it(change_list); Item_change_record *change; - DBUG_ENTER("rollback_item_tree_changes"); while ((change= it++)) { - DBUG_PRINT("info", ("revert %p -> %p", - change->old_value, (*change->place))); *change->place= change->old_value; } /* We can forget about changes memory: it's allocated in runtime memroot */ change_list.empty(); - DBUG_VOID_RETURN; } @@ -3725,7 +3731,7 @@ void Statement::set_statement(Statement *stmt) { id= stmt->id; mark_used_columns= stmt->mark_used_columns; - lex= stmt->lex; + stmt_lex= lex= stmt->lex; query_string= stmt->query_string; } |