summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2018-01-21 23:44:31 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2018-01-23 13:42:41 +0100
commit11408a69adc6749c855a9867fc4db3e3d45236c3 (patch)
treedd3e895cae0202be7055e8193f8bb27a12d651c7
parent94da1cb4a67ecb2e2590748381eebac072308ce6 (diff)
downloadmariadb-git-11408a69adc6749c855a9867fc4db3e3d45236c3.tar.gz
Fix Item tree changes/rollback debug print
-rw-r--r--sql/sql_class.cc8
-rw-r--r--sql/sql_class.h4
2 files changed, 8 insertions, 4 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index b007729494e..c88c13b9524 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -2234,6 +2234,9 @@ void THD::check_and_register_item_tree_change(Item **place, Item **new_value,
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++))
{
@@ -2243,6 +2246,7 @@ void THD::check_and_register_item_tree_change(Item **place, Item **new_value,
if (change)
nocheck_register_item_tree_change(place, change->old_value,
runtime_memroot);
+ DBUG_VOID_RETURN;
}
@@ -2250,17 +2254,13 @@ void THD::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;
}
diff --git a/sql/sql_class.h b/sql/sql_class.h
index e8f50f13ebc..bff7492ffec 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -2725,10 +2725,14 @@ public:
void change_item_tree(Item **place, Item *new_value)
{
+ DBUG_ENTER("THD::change_item_tree");
+ DBUG_PRINT("enter", ("Register: %p (%p) <- %p",
+ *place, place, new_value));
/* TODO: check for OOM condition here */
if (!stmt_arena->is_conventional())
nocheck_register_item_tree_change(place, *place, mem_root);
*place= new_value;
+ DBUG_VOID_RETURN;
}
/**
Make change in item tree after checking whether it needs registering