mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
optimisation of independent ALL/ANY with aggregate function (WL#1115) (SCRUM)
mysql-test/r/subselect.result: test of new optimisation mysql-test/t/subselect.test: test of new optimisation sql/item_subselect.cc: special subselect to finding max/min of returned values optimisation of independent ALL/ANY with aggregate function sql/item_subselect.h: special subselect to finding max/min of returned values sql/sql_class.cc: class for collaction result for max/min subquery sql/sql_class.h: class for collaction result for max/min subquery
This commit is contained in:
parent
c4a8e2f3c1
commit
964ffc34b1
6 changed files with 184 additions and 30 deletions
|
|
@ -130,6 +130,7 @@ public:
|
|||
max_length= item->max_length;
|
||||
decimals= item->decimals;
|
||||
}
|
||||
Item_singlerow_subselect() :Item_subselect(), value(0), row (0) {}
|
||||
|
||||
subs_type substype() { return SINGLEROW_SUBS; }
|
||||
|
||||
|
|
@ -153,6 +154,15 @@ public:
|
|||
friend class select_singlerow_subselect;
|
||||
};
|
||||
|
||||
/* used in static ALL/ANY optimisation */
|
||||
class Item_maxmin_subselect: public Item_singlerow_subselect
|
||||
{
|
||||
public:
|
||||
Item_maxmin_subselect(THD *thd, st_select_lex *select_lex, bool max);
|
||||
Item_maxmin_subselect(Item_maxmin_subselect *item)
|
||||
:Item_singlerow_subselect(item) {}
|
||||
};
|
||||
|
||||
/* exists subselect */
|
||||
|
||||
class Item_exists_subselect :public Item_subselect
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue