Skip to content

Commit 11408a6

Browse files
committed
Fix Item tree changes/rollback debug print
1 parent 94da1cb commit 11408a6

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

sql/sql_class.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2234,6 +2234,9 @@ void THD::check_and_register_item_tree_change(Item **place, Item **new_value,
22342234
MEM_ROOT *runtime_memroot)
22352235
{
22362236
Item_change_record *change;
2237+
DBUG_ENTER("THD::check_and_register_item_tree_change");
2238+
DBUG_PRINT("enter", ("Register: %p (%p) <- %p (%p)",
2239+
*place, place, *new_value, new_value));
22372240
I_List_iterator<Item_change_record> it(change_list);
22382241
while ((change= it++))
22392242
{
@@ -2243,24 +2246,21 @@ void THD::check_and_register_item_tree_change(Item **place, Item **new_value,
22432246
if (change)
22442247
nocheck_register_item_tree_change(place, change->old_value,
22452248
runtime_memroot);
2249+
DBUG_VOID_RETURN;
22462250
}
22472251

22482252

22492253
void THD::rollback_item_tree_changes()
22502254
{
22512255
I_List_iterator<Item_change_record> it(change_list);
22522256
Item_change_record *change;
2253-
DBUG_ENTER("rollback_item_tree_changes");
22542257

22552258
while ((change= it++))
22562259
{
2257-
DBUG_PRINT("info", ("revert %p -> %p",
2258-
change->old_value, (*change->place)));
22592260
*change->place= change->old_value;
22602261
}
22612262
/* We can forget about changes memory: it's allocated in runtime memroot */
22622263
change_list.empty();
2263-
DBUG_VOID_RETURN;
22642264
}
22652265

22662266

sql/sql_class.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2725,10 +2725,14 @@ class THD :public Statement,
27252725

27262726
void change_item_tree(Item **place, Item *new_value)
27272727
{
2728+
DBUG_ENTER("THD::change_item_tree");
2729+
DBUG_PRINT("enter", ("Register: %p (%p) <- %p",
2730+
*place, place, new_value));
27282731
/* TODO: check for OOM condition here */
27292732
if (!stmt_arena->is_conventional())
27302733
nocheck_register_item_tree_change(place, *place, mem_root);
27312734
*place= new_value;
2735+
DBUG_VOID_RETURN;
27322736
}
27332737
/**
27342738
Make change in item tree after checking whether it needs registering

0 commit comments

Comments
 (0)