diff options
author | unknown <bell@sanja.is.com.ua> | 2003-07-24 15:26:21 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2003-07-24 15:26:21 +0300 |
commit | 9a3979e23455c203857f05482c9f51a5350cf441 (patch) | |
tree | eeaa5ce2649f296092dab3d519b7928e56ab058d /sql/item_subselect.h | |
parent | d35bf560bedd73803c2340d44704b173b2bead3c (diff) | |
download | mariadb-git-9a3979e23455c203857f05482c9f51a5350cf441.tar.gz |
independent ALL/ANY subselect on top of WHERE clause (subselect without GROUP BY or aggregate functions) optimisation
(SCRUM) (WL#1086)
mysql-test/r/subselect.result:
new optimisation tests
mysql-test/t/subselect.test:
new optimisation tests
sql/item_cmpfunc.cc:
new NOT
sql/item_cmpfunc.h:
new NOT
sql/item_subselect.cc:
independent ALL/ANY in top of WHERE clause optimisation
sql/item_subselect.h:
independent ALL/ANY in top of WHERE clause optimisation
sql/item_sum.cc:
prevent fixlields call for parameters of min/max if it is already done
sql/sql_union.cc:
removed debuging print
sql/sql_yacc.yy:
support of ALL optimisation
Diffstat (limited to 'sql/item_subselect.h')
-rw-r--r-- | sql/item_subselect.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h index e2738102ebd..65039589da4 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -53,7 +53,7 @@ public: enum trans_res {OK, REDUCE, ERROR}; enum subs_type {UNKNOWN_SUBS, SINGLEROW_SUBS, - EXISTS_SUBS, IN_SUBS, ALLANY_SUBS}; + EXISTS_SUBS, IN_SUBS, ALL_SUBS, ANY_SUBS}; Item_subselect(); Item_subselect(Item_subselect *item) @@ -202,6 +202,8 @@ protected: bool was_null; bool abort_on_null; public: + Item_func_not_all *upper_not; // point on NOT before ALL subquery + Item_in_subselect(THD *thd, Item * left_expr, st_select_lex *select_lex); Item_in_subselect(Item_in_subselect *item); Item_in_subselect(): Item_exists_subselect(), abort_on_null(0) {} @@ -241,7 +243,8 @@ public: Item_allany_subselect(THD *thd, Item * left_expr, compare_func_creator f, st_select_lex *select_lex); Item_allany_subselect(Item_allany_subselect *item); - subs_type substype() { return ALLANY_SUBS; } + // only ALL subquery has upper not + subs_type substype() { return upper_not?ALL_SUBS:ANY_SUBS; } trans_res select_transformer(JOIN *join); }; |