diff options
author | Monty <monty@mariadb.org> | 2021-07-03 03:39:15 +0300 |
---|---|---|
committer | Vicențiu Ciorbaru <cvicentiu@gmail.com> | 2021-07-19 17:05:51 +0300 |
commit | fcbb2a1df1366dfbf8e1b0db7a03e8927a1d1d37 (patch) | |
tree | 28f731261a55c13766c79169417a85ff37a6c85e /sql/item_subselect.h | |
parent | f069aa1dc24d2d835505b8c4567a704cf80c42f1 (diff) | |
download | mariadb-git-fcbb2a1df1366dfbf8e1b0db7a03e8927a1d1d37.tar.gz |
Make marking/testing of top level item uniform
There where several different implementations of is_top_level_item(),
with different variable names and tests. In some cases the code used
'is_top_level_item()' as a test, in other cases it accessed the variable
directrly. This patch makes all usage of 'top_level_item' uniform.
The new implementation stores the 'is_tol_level_item()' flag as part
of base_flags. This saves 7 bytes in all items that previously stored
the flag in it's own bool.
I had to keep 'top_level_item()' virtual to ensure that Item_bool_const
item's will not be updated. 'is_top_level_item()' is not virtual
anymore.
Diffstat (limited to 'sql/item_subselect.h')
-rw-r--r-- | sql/item_subselect.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h index 426b76f8067..54e4f8f0ced 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -373,7 +373,6 @@ class Item_exists_subselect :public Item_subselect protected: Item_func_not *upper_not; bool value; /* value of this item (boolean: exists/not-exists) */ - bool abort_on_null; void init_length_and_dec(); bool select_prepare_to_be_in(); @@ -397,7 +396,7 @@ public: Item_exists_subselect(THD *thd_arg, st_select_lex *select_lex); Item_exists_subselect(THD *thd_arg): - Item_subselect(thd_arg), upper_not(NULL), abort_on_null(0), + Item_subselect(thd_arg), upper_not(NULL), emb_on_expr_nest(NULL), optimizer(0), exists_transformed(0) {} @@ -424,8 +423,6 @@ public: bool fix_length_and_dec() override; void print(String *str, enum_query_type query_type) override; bool select_transformer(JOIN *join) override; - void top_level_item() override { abort_on_null=1; } - bool is_top_level_item() const override { return abort_on_null; } bool exists2in_processor(void *opt_arg) override; Item* expr_cache_insert_transformer(THD *thd, uchar *unused) override; |