summaryrefslogtreecommitdiff
path: root/sql/item_sum.h
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2017-11-22 08:01:07 +0200
committerMichael Widenius <monty@mariadb.org>2017-11-23 09:49:45 +0200
commit166056f744ac66920a0777b8a4327fd4ebb1e5be (patch)
tree3f66b2dcc81b09cb1a426b587d5fccae188c5744 /sql/item_sum.h
parente44107c4d93155bebdaf1be718be0fea50a4a1ad (diff)
downloadmariadb-git-166056f744ac66920a0777b8a4327fd4ebb1e5be.tar.gz
Remove not used mem_root argument from build_clone(), get_copy() and get_item_copy()
TODO: - Make get_thd_memroot() inline - To do this, we need to reduce dependence of include files, especially so that sql_class.h is not depending in item.h
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r--sql/item_sum.h76
1 files changed, 38 insertions, 38 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h
index e91728a1aa1..9822f9e5430 100644
--- a/sql/item_sum.h
+++ b/sql/item_sum.h
@@ -792,8 +792,8 @@ public:
}
Item *copy_or_same(THD* thd);
void remove();
- Item *get_copy(THD *thd, MEM_ROOT *mem_root)
- { return get_item_copy<Item_sum_sum>(thd, mem_root, this); }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_sum_sum>(thd, this); }
bool supports_removal() const
{
@@ -856,8 +856,8 @@ class Item_sum_count :public Item_sum_int
return has_with_distinct() ? "count(distinct " : "count(";
}
Item *copy_or_same(THD* thd);
- Item *get_copy(THD *thd, MEM_ROOT *mem_root)
- { return get_item_copy<Item_sum_count>(thd, mem_root, this); }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_sum_count>(thd, this); }
bool supports_removal() const
{
@@ -912,8 +912,8 @@ public:
count= 0;
Item_sum_sum::cleanup();
}
- Item *get_copy(THD *thd, MEM_ROOT *mem_root)
- { return get_item_copy<Item_sum_avg>(thd, mem_root, this); }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_sum_avg>(thd, this); }
bool supports_removal() const
{
@@ -978,8 +978,8 @@ public:
count= 0;
Item_sum_num::cleanup();
}
- Item *get_copy(THD *thd, MEM_ROOT *mem_root)
- { return get_item_copy<Item_sum_variance>(thd, mem_root, this); }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_sum_variance>(thd, this); }
};
/*
@@ -999,8 +999,8 @@ class Item_sum_std :public Item_sum_variance
Item *result_item(THD *thd, Field *field);
const char *func_name() const { return "std("; }
Item *copy_or_same(THD* thd);
- Item *get_copy(THD *thd, MEM_ROOT *mem_root)
- { return get_item_copy<Item_sum_std>(thd, mem_root, this); }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_sum_std>(thd, this); }
};
// This class is a string or number function depending on num_func
@@ -1069,8 +1069,8 @@ public:
bool add();
const char *func_name() const { return "min("; }
Item *copy_or_same(THD* thd);
- Item *get_copy(THD *thd, MEM_ROOT *mem_root)
- { return get_item_copy<Item_sum_min>(thd, mem_root, this); }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_sum_min>(thd, this); }
};
@@ -1084,8 +1084,8 @@ public:
bool add();
const char *func_name() const { return "max("; }
Item *copy_or_same(THD* thd);
- Item *get_copy(THD *thd, MEM_ROOT *mem_root)
- { return get_item_copy<Item_sum_max>(thd, mem_root, this); }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_sum_max>(thd, this); }
};
@@ -1165,8 +1165,8 @@ public:
bool add();
const char *func_name() const { return "bit_or("; }
Item *copy_or_same(THD* thd);
- Item *get_copy(THD *thd, MEM_ROOT *mem_root)
- { return get_item_copy<Item_sum_or>(thd, mem_root, this); }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_sum_or>(thd, this); }
private:
void set_bits_from_counters();
@@ -1182,8 +1182,8 @@ public:
bool add();
const char *func_name() const { return "bit_and("; }
Item *copy_or_same(THD* thd);
- Item *get_copy(THD *thd, MEM_ROOT *mem_root)
- { return get_item_copy<Item_sum_and>(thd, mem_root, this); }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_sum_and>(thd, this); }
private:
void set_bits_from_counters();
@@ -1197,8 +1197,8 @@ public:
bool add();
const char *func_name() const { return "bit_xor("; }
Item *copy_or_same(THD* thd);
- Item *get_copy(THD *thd, MEM_ROOT *mem_root)
- { return get_item_copy<Item_sum_xor>(thd, mem_root, this); }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_sum_xor>(thd, this); }
private:
void set_bits_from_counters();
@@ -1255,8 +1255,8 @@ public:
my_decimal *val_decimal(my_decimal *dec) { return val_decimal_from_real(dec); }
String *val_str(String *str) { return val_string_from_real(str); }
double val_real();
- Item *get_copy(THD *thd, MEM_ROOT *mem_root)
- { return get_item_copy<Item_avg_field_double>(thd, mem_root, this); }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_avg_field_double>(thd, this); }
};
@@ -1275,8 +1275,8 @@ public:
longlong val_int() { return val_int_from_decimal(); }
String *val_str(String *str) { return val_string_from_decimal(str); }
my_decimal *val_decimal(my_decimal *);
- Item *get_copy(THD *thd, MEM_ROOT *mem_root)
- { return get_item_copy<Item_avg_field_decimal>(thd, mem_root, this); }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_avg_field_decimal>(thd, this); }
};
@@ -1296,8 +1296,8 @@ public:
{ return val_decimal_from_real(dec_buf); }
bool is_null() { update_null_value(); return null_value; }
const Type_handler *type_handler() const { return &type_handler_double; }
- Item *get_copy(THD *thd, MEM_ROOT *mem_root)
- { return get_item_copy<Item_variance_field>(thd, mem_root, this); }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_variance_field>(thd, this); }
};
@@ -1309,8 +1309,8 @@ public:
{ }
enum Type type() const { return FIELD_STD_ITEM; }
double val_real();
- Item *get_copy(THD *thd, MEM_ROOT *mem_root)
- { return get_item_copy<Item_std_field>(thd, mem_root, this); }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_std_field>(thd, this); }
};
@@ -1396,8 +1396,8 @@ class Item_sum_udf_float :public Item_udf_sum
const Type_handler *type_handler() const { return &type_handler_double; }
void fix_length_and_dec() { fix_num_length_and_dec(); }
Item *copy_or_same(THD* thd);
- Item *get_copy(THD *thd, MEM_ROOT *mem_root)
- { return get_item_copy<Item_sum_udf_float>(thd, mem_root, this); }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_sum_udf_float>(thd, this); }
};
@@ -1418,8 +1418,8 @@ public:
const Type_handler *type_handler() const { return &type_handler_longlong; }
void fix_length_and_dec() { decimals=0; max_length=21; }
Item *copy_or_same(THD* thd);
- Item *get_copy(THD *thd, MEM_ROOT *mem_root)
- { return get_item_copy<Item_sum_udf_int>(thd, mem_root, this); }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_sum_udf_int>(thd, this); }
};
@@ -1459,8 +1459,8 @@ public:
const Type_handler *type_handler() const { return string_type_handler(); }
void fix_length_and_dec();
Item *copy_or_same(THD* thd);
- Item *get_copy(THD *thd, MEM_ROOT *mem_root)
- { return get_item_copy<Item_sum_udf_str>(thd, mem_root, this); }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_sum_udf_str>(thd, this); }
};
@@ -1480,8 +1480,8 @@ public:
const Type_handler *type_handler() const { return &type_handler_newdecimal; }
void fix_length_and_dec() { fix_num_length_and_dec(); }
Item *copy_or_same(THD* thd);
- Item *get_copy(THD *thd, MEM_ROOT *mem_root)
- { return get_item_copy<Item_sum_udf_decimal>(thd, mem_root, this); }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_sum_udf_decimal>(thd, this); }
};
#else /* Dummy functions to get sql_yacc.cc compiled */
@@ -1668,8 +1668,8 @@ public:
virtual void print(String *str, enum_query_type query_type);
virtual bool change_context_processor(void *cntx)
{ context= (Name_resolution_context *)cntx; return FALSE; }
- Item *get_copy(THD *thd, MEM_ROOT *mem_root)
- { return get_item_copy<Item_func_group_concat>(thd, mem_root, this); }
+ Item *get_copy(THD *thd)
+ { return get_item_copy<Item_func_group_concat>(thd, this); }
};
#endif /* ITEM_SUM_INCLUDED */