summaryrefslogtreecommitdiff
path: root/sql/item_sum.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2015-04-29 17:53:27 +0400
committerAlexander Barkov <bar@mariadb.org>2015-04-29 17:53:27 +0400
commit499deca7fc7e8185434eaaf6923f600e18d95d90 (patch)
tree3d86ad953cd445799c513ac991258f56fd5837fb /sql/item_sum.h
parent9cdf5c2bfd362764444bb3658ec23490658f16fb (diff)
downloadmariadb-git-499deca7fc7e8185434eaaf6923f600e18d95d90.tar.gz
A clean-up for c8141f53140054282306d17459310fbca94cbf0e
MDEV-7950 Item_func::type() takes 0.26% in OLTP RO (Step#2) - Item_ref was doing unnecessary extra job after the "MDEV-7950 Step#2" patch. Fallback to Item::build_equal_items() if real_type() is not FIELD_ITEM. Note, Item_ref::build_equal_items() will most likely be further simplified. Waiting for Sanja and Igor to check a possibly dead code. - Safety: Adding Item_sum::build_equal_items() with ASSERT, as Item_sum should never appear in build_equal_items() context.
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r--sql/item_sum.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h
index db45a336b46..b540b44a31e 100644
--- a/sql/item_sum.h
+++ b/sql/item_sum.h
@@ -444,6 +444,17 @@ public:
*/
table_map used_tables() const { return used_tables_cache; }
void update_used_tables ();
+ COND *build_equal_items(THD *thd, COND_EQUAL *inherited,
+ bool link_item_fields)
+ {
+ /*
+ Item_sum (and derivants) of the original WHERE/HAVING clauses
+ should already be replaced to Item_aggregate_ref by the time when
+ build_equal_items() is called. See Item::split_sum_func2().
+ */
+ DBUG_ASSERT(0);
+ return Item::build_equal_items(thd, inherited, link_item_fields);
+ }
bool is_null() { return null_value; }
void make_const ()
{