diff options
author | Alexander Barkov <bar@mariadb.org> | 2018-01-16 16:09:51 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2018-01-16 16:18:50 +0400 |
commit | 81378b394763e56d57c4a4fc3c20244cc0ee9cc5 (patch) | |
tree | 51e1b892f98333d57fbbe1afe772d242a998526c /sql/sp_head.cc | |
parent | be85c2dc889b668382106071e712213cd3b1cbcf (diff) | |
download | mariadb-git-81378b394763e56d57c4a4fc3c20244cc0ee9cc5.tar.gz |
Moving a change_list related methods from THD to Item_change_list
1. Moving the following methods from THD to Item_change_list:
nocheck_register_item_tree_change()
check_and_register_item_tree_change()
rollback_item_tree_changes()
as they work only with the "change_list" member and don't
require anything else from THD.
2. Deriving THD from Item_change_list
This change will help to fix "MDEV-14603 signal 11 with short stacktrace" easier.
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r-- | sql/sp_head.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 7816af398c2..8b05d14f2de 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -1249,7 +1249,7 @@ sp_head::execute(THD *thd, bool merge_da_on_success) We should also save Item tree change list to avoid rollback something too early in the calling query. */ - thd->change_list.move_elements_to(&old_change_list); + thd->Item_change_list::move_elements_to(&old_change_list); /* Cursors will use thd->packet, so they may corrupt data which was prepared for sending by upper level. OTOH cursors in the same routine can share this @@ -1389,8 +1389,8 @@ sp_head::execute(THD *thd, bool merge_da_on_success) /* Restore all saved */ thd->server_status= (thd->server_status & ~status_backup_mask) | old_server_status; old_packet.swap(thd->packet); - DBUG_ASSERT(thd->change_list.is_empty()); - old_change_list.move_elements_to(&thd->change_list); + DBUG_ASSERT(thd->Item_change_list::is_empty()); + old_change_list.move_elements_to(thd); thd->lex= old_lex; thd->set_query_id(old_query_id); DBUG_ASSERT(!thd->derived_tables); @@ -2976,7 +2976,7 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp, bool parent_modified_non_trans_table= thd->transaction.stmt.modified_non_trans_table; thd->transaction.stmt.modified_non_trans_table= FALSE; DBUG_ASSERT(!thd->derived_tables); - DBUG_ASSERT(thd->change_list.is_empty()); + DBUG_ASSERT(thd->Item_change_list::is_empty()); /* Use our own lex. We should not save old value since it is saved/restored in |