summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.cc
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2004-10-08 19:13:09 +0400
committerunknown <konstantin@mysql.com>2004-10-08 19:13:09 +0400
commit166d19e9638595cd56cdfb1d65dbebdd64e6013d (patch)
tree340f7d7161a03919e35c9d1d393b1ee8b23a5fbf /sql/item_strfunc.cc
parentc428135ec8550b62a58ac061733c6c31c277a651 (diff)
downloadmariadb-git-166d19e9638595cd56cdfb1d65dbebdd64e6013d.tar.gz
Deployment of centralized Item change registry, step 2: Item_ref
doesn't need to have it's own recovery mechanism. sql/item.cc: Deployment of centralized Item change registry, step 2: Item_ref doesn't need to have it's own recovery mechanism, so it was simplified. sql/item.h: Deployment of centralized Item change registry, step 2: Item_ref doesn't need to have it's own recovery mechanism, so it was simplified. sql/item_cmpfunc.cc: - Item::split_sum_func now requires THD - use THD::register_item_tree_change sql/item_cmpfunc.h: - Item::split_sum_func now requires THD sql/item_func.cc: - Item::split_sum_func now requires THD - use THD::register_item_tree_change sql/item_func.h: - Item::split_sum_func now requires THD sql/item_row.cc: - Item::split_sum_func now requires THD - use THD::register_item_tree_change sql/item_row.h: - Item::split_sum_func now requires THD sql/item_strfunc.cc: - Item::split_sum_func now requires THD - use THD::register_item_tree_change to register changes in the item tree sql/item_strfunc.h: - Item::split_sum_func now requires THD sql/item_subselect.cc: - use updated Item_ref constructor sql/sql_base.cc: - Item::split_sum_func now requires THD sql/sql_select.cc: - Item::split_sum_func now requires THD sql/sql_yacc.yy: - use updated Item_ref constructor
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r--sql/item_strfunc.cc19
1 files changed, 10 insertions, 9 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 78acaafc486..843177a850f 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -635,20 +635,20 @@ null:
return 0;
}
-void Item_func_concat_ws::split_sum_func(Item **ref_pointer_array,
+void Item_func_concat_ws::split_sum_func(THD *thd, Item **ref_pointer_array,
List<Item> &fields)
{
if (separator->with_sum_func && separator->type() != SUM_FUNC_ITEM)
- separator->split_sum_func(ref_pointer_array, fields);
+ separator->split_sum_func(thd, ref_pointer_array, fields);
else if (separator->used_tables() || separator->type() == SUM_FUNC_ITEM)
{
uint el= fields.elements;
fields.push_front(separator);
ref_pointer_array[el]= separator;
- separator= new Item_ref(ref_pointer_array + el,
- &separator, 0, separator->name);
+ thd->register_item_tree_change(&separator, separator, &thd->mem_root);
+ separator= new Item_ref(ref_pointer_array + el, 0, separator->name);
}
- Item_str_func::split_sum_func(ref_pointer_array, fields);
+ Item_str_func::split_sum_func(thd, ref_pointer_array, fields);
}
void Item_func_concat_ws::fix_length_and_dec()
@@ -1771,19 +1771,20 @@ String *Item_func_elt::val_str(String *str)
}
-void Item_func_make_set::split_sum_func(Item **ref_pointer_array,
+void Item_func_make_set::split_sum_func(THD *thd, Item **ref_pointer_array,
List<Item> &fields)
{
if (item->with_sum_func && item->type() != SUM_FUNC_ITEM)
- item->split_sum_func(ref_pointer_array, fields);
+ item->split_sum_func(thd, ref_pointer_array, fields);
else if (item->used_tables() || item->type() == SUM_FUNC_ITEM)
{
uint el= fields.elements;
fields.push_front(item);
ref_pointer_array[el]= item;
- item= new Item_ref(ref_pointer_array + el, &item, 0, item->name);
+ thd->register_item_tree_change(&item, item, &thd->mem_root);
+ item= new Item_ref(ref_pointer_array + el, 0, item->name);
}
- Item_str_func::split_sum_func(ref_pointer_array, fields);
+ Item_str_func::split_sum_func(thd, ref_pointer_array, fields);
}