1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

reporting empty result added in case of max/min optimisation of ALL/ANY/SOME subqueries

fixed null processing in NOT operation used in ALL subquery (Bug #6247)


mysql-test/r/subselect.result:
  new tests of ALL/ANY wiews
mysql-test/t/subselect.test:
  new tests of ALL/ANY wiews
sql/item_cmpfunc.cc:
  fixed special NOT ALL processing
  fixed processing max/min optimized subqueries with empty results (added methods to detect empty results) and special NOP operation to process them for SOME/ANY sobqueries
sql/item_cmpfunc.h:
  fixed processing max/min optimized subqueries with empty results (added methods to detect empty results) and special NOP operation to process them for SOME/ANY sobqueries
sql/item_subselect.cc:
  reporting empty result added for max/min subqueries
sql/item_subselect.h:
  reporting empty result added for max/min subqueries
sql/item_sum.cc:
  reporting empty result added fox max/min aggregate functions
sql/item_sum.h:
  reporting empty result added fox max/min aggregate functions
sql/sql_class.cc:
  reporting empty result added for max/min subqueries
sql/sql_parse.cc:
  reporting empty result added for max/min subqueries
sql/sql_union.cc:
  reporting empty result added for max/min subqueries
This commit is contained in:
unknown
2004-11-18 18:10:07 +02:00
parent 3a301ac1f8
commit 9438c2ca76
11 changed files with 230 additions and 26 deletions

View File

@@ -5114,9 +5114,9 @@ Item * all_any_subquery_creator(Item *left_expr,
Item_allany_subselect *it=
new Item_allany_subselect(left_expr, (*cmp)(all), select_lex, all);
if (all)
return it->upper_not= new Item_func_not_all(it); /* ALL */
return it->upper_item= new Item_func_not_all(it); /* ALL */
return it; /* ANY/SOME */
return it->upper_item= new Item_func_nop_all(it); /* ANY/SOME */
}