summaryrefslogtreecommitdiff
path: root/sql/item_subselect.h
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2020-07-28 19:41:05 +0300
committerSergei Golubchik <serg@mariadb.org>2021-05-19 22:27:28 +0200
commitae39f4f6d61bdd57394afa8f88285f9e34640eb7 (patch)
tree52c6ff54e719f69cab2b9d1638ff642d12bfd9a6 /sql/item_subselect.h
parent963e5e406da7bc94eff3e8fc07f6cb625dd84d52 (diff)
downloadmariadb-git-ae39f4f6d61bdd57394afa8f88285f9e34640eb7.tar.gz
Revert MDEV-16592 "Change Item::with_sum_func to a virtual method"
Added back variable 'with_sum_func' to Item class as a bit field. This made the code shorter, faster (removed some virtual methods, less code to create an initialized item etc) and made many Item's 7 bytes smaller. The code is also easier to understand as 'with_sum_func' is threated as any other Item variable when creating or copying items.
Diffstat (limited to 'sql/item_subselect.h')
-rw-r--r--sql/item_subselect.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h
index 1f1c3454a55..21b5ffdf3d7 100644
--- a/sql/item_subselect.h
+++ b/sql/item_subselect.h
@@ -47,8 +47,7 @@ class Cached_item;
/* base class for subselects */
class Item_subselect :public Item_result_field,
- protected Used_tables_and_const_cache,
- protected With_sum_func_cache
+ protected Used_tables_and_const_cache
{
/*
Set to TRUE if the value is assigned for the subselect
@@ -193,8 +192,6 @@ public:
}
bool fix_fields(THD *thd, Item **ref) override;
bool with_subquery() const override { DBUG_ASSERT(fixed); return true; }
- bool with_sum_func() const override { return m_with_sum_func; }
- With_sum_func_cache* get_with_sum_func_cache() override { return this; }
bool mark_as_dependent(THD *thd, st_select_lex *select, Item *item);
void fix_after_pullout(st_select_lex *new_parent, Item **ref,
bool merge) override;