diff options
author | Alexander Barkov <bar@mariadb.org> | 2015-05-14 17:42:40 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2015-05-14 17:42:40 +0400 |
commit | 632f2307f775d255bab948de2178feb85fcac970 (patch) | |
tree | 6f1e67f8c41d13e3a4c2e67124ae37037f78c6fe /sql/item_cmpfunc.h | |
parent | fb3e9352a42338f4221caa7e0cb6c6f62eb9f2be (diff) | |
download | mariadb-git-632f2307f775d255bab948de2178feb85fcac970.tar.gz |
MDEV-7950 Item_func::type() takes 0.26% in OLTP RO
Step#5: changing the function remove_eq_conds() into a virtual method in Item.
It removes 6 virtual calls for Item_func::type(), and adds only 2
virtual calls for Item***::remove_eq_conds().
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 5064521c1a1..11358ca8240 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -409,6 +409,8 @@ public: Item_bool_func::cleanup(); cmp.cleanup(); } + COND *remove_eq_conds(THD *thd, Item::cond_result *cond_value, + bool top_level); friend class Arg_comparator; }; @@ -1467,6 +1469,8 @@ public: const_item_cache= args[0]->const_item(); } } + COND *remove_eq_conds(THD *thd, Item::cond_result *cond_value, + bool top_level); table_map not_null_tables() const { return 0; } Item *neg_transformer(THD *thd); }; @@ -1775,6 +1779,8 @@ public: COND *build_equal_items(THD *thd, COND_EQUAL *inherited, bool link_item_fields, COND_EQUAL **cond_equal_ref); + COND *remove_eq_conds(THD *thd, Item::cond_result *cond_value, + bool top_level); virtual void print(String *str, enum_query_type query_type); void split_sum_func(THD *thd, Item **ref_pointer_array, List<Item> &fields); friend int setup_conds(THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves, |