From 4d68a0dbd602606bcde58ab959f448c2658346a6 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 27 Oct 2003 01:01:27 +0200 Subject: fixed ALL/ANY optimisation with union (BUG#1668) code cleanup mysql-test/r/subselect.result: test for BUG#1668 mysql-test/t/subselect.test: test for BUG#1668 sql/item_subselect.cc: removed unused class field fixed min_max subquery used_tables()/const() fixed ALL/ANY optimisation for unions sql/item_subselect.h: removed unused class field fixed min_max subquery used_tables()/const() sql/sql_union.cc: fixed result object assignment --- sql/item_subselect.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sql/item_subselect.h') diff --git a/sql/item_subselect.h b/sql/item_subselect.h index 3a543ff288c..7e735165c02 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -33,7 +33,6 @@ typedef Item_bool_func2* (*compare_func_creator)(Item*, Item*); class Item_subselect :public Item_result_field { - my_bool engine_owner; /* Is this item owner of engine */ my_bool value_assigned; /* value already assigned to subselect */ protected: /* thread handler, will be assigned in fix_fields only */ @@ -90,6 +89,8 @@ public: virtual void fix_length_and_dec(); table_map used_tables() const; bool const_item() const; + inline table_map get_used_tables_cache() { return used_tables_cache; } + inline bool get_const_item_cache() { return const_item_cache; } void update_used_tables(); void print(String *str) { @@ -144,10 +145,11 @@ public: }; /* used in static ALL/ANY optimisation */ -class Item_maxmin_subselect: public Item_singlerow_subselect +class Item_maxmin_subselect :public Item_singlerow_subselect { public: - Item_maxmin_subselect(st_select_lex *select_lex, bool max); + Item_maxmin_subselect(Item_subselect *parent, + st_select_lex *select_lex, bool max); }; /* exists subselect */ -- cgit v1.2.1