summaryrefslogtreecommitdiff
path: root/sql/item_sum.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2003-01-30 18:07:39 +0200
committerunknown <bell@sanja.is.com.ua>2003-01-30 18:07:39 +0200
commit43b99e58c5eca989325b0f273f47b2b18e32c20c (patch)
treebafc998fbb4616150087e1b6ce3cfc1d48b8362f /sql/item_sum.cc
parenta0ddb72d52de3576fb0441e37e169f7cedd1fc1e (diff)
downloadmariadb-git-43b99e58c5eca989325b0f273f47b2b18e32c20c.tar.gz
changes based on partial revie of task 577 (SCRUM)
sql/item.cc: Fixed Item usual constructor to call current_thd only once. Fixed copy constructor to receive THD pointer via arguments. added comments removed counter-1 and unnessesary initializaton of counter sql/item.h: Fixed copy constructor to receive THD pointer via arguments. Renamed get_same to copy_or_same. THD pointetr added to copy_or_same and get_tmp_table_item. sql/item_cmpfunc.cc: fixed layout fixed direct call of destructor sql/item_func.cc: fiex layout THD pointetr added to get_tmp_table_item. sql/item_func.h: THD pointetr added to get_tmp_table_item. sql/item_sum.cc: Fixed copy constructor to receive THD pointer via arguments. Renamed get_same to copy_or_same. THD pointetr added to copy_or_same and get_tmp_table_item. sql/item_sum.h: fixed layout Fixed copy constructor to receive THD pointer via arguments. Renamed get_same to copy_or_same. THD pointetr added to copy_or_same and get_tmp_table_item. sql/item_uniq.h: Fixed copy constructor to receive THD pointer via arguments. Renamed get_same to copy_or_same. THD pointetr added to copy_or_same and get_tmp_table_item. sql/sql_base.cc: count from 0 sql/sql_select.cc: removed counter-1 and unnessesary initializaton of counter THD pointetr added to get_tmp_table_item and change_to_use_tmp_fields.
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r--sql/item_sum.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 13e70358b05..7ded4921180 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -41,8 +41,9 @@ Item_sum::Item_sum(List<Item> &list)
list.empty(); // Fields are used
}
-Item_sum::Item_sum(Item_sum &item):
- Item_result_field(item), quick_group(item.quick_group)
+// Constructor used in processing select with temporary tebles
+Item_sum::Item_sum(THD *thd, Item_sum &item):
+ Item_result_field(thd, item), quick_group(item.quick_group)
{
arg_count= item.arg_count;
if (arg_count <= 2)
@@ -96,9 +97,9 @@ void Item_sum::fix_num_length_and_dec()
max_length=float_length(decimals);
}
-Item * Item_sum::get_tmp_table_item()
+Item *Item_sum::get_tmp_table_item(THD *thd)
{
- Item_sum* sum_item= (Item_sum *) get_same();
+ Item_sum* sum_item= (Item_sum *) copy_or_same(thd);
if (sum_item && sum_item->result_field) // If not a const sum func
{
Field *result_field= sum_item->result_field;