diff options
author | unknown <bell@sanja.is.com.ua> | 2003-10-22 20:52:47 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2003-10-22 20:52:47 +0300 |
commit | 47f3a4fd4aa4ac7f2944c85aa20333fa0259ac77 (patch) | |
tree | 094f3d63a932eeaa346520cc5605255beab9debe /sql/item_subselect.h | |
parent | 9a4aa99769b29cb4084b3b16d2bfb7067d817d2c (diff) | |
parent | b7aac7df29e716ab0bfd95e2c7349287912dcbf6 (diff) | |
download | mariadb-git-47f3a4fd4aa4ac7f2944c85aa20333fa0259ac77.tar.gz |
Merge
mysql-test/t/subselect.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_derived.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
mysql-test/r/subselect.result:
SCCS merged
Diffstat (limited to 'sql/item_subselect.h')
-rw-r--r-- | sql/item_subselect.h | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h index 312b453a5a2..fd4bca33c62 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -85,13 +85,7 @@ public: bool exec(); virtual void fix_length_and_dec(); table_map used_tables() const; - void print(String *str) - { - if (name) - str->append(name); - else - str->append("-subselect-"); - } + void print(String *str); bool change_engine(subselect_engine *eng) { engine= eng; @@ -138,8 +132,10 @@ public: /* used in static ALL/ANY optimisation */ class Item_maxmin_subselect: public Item_singlerow_subselect { + bool max; public: Item_maxmin_subselect(st_select_lex *select_lex, bool max); + void print(String *str); }; /* exists subselect */ @@ -164,6 +160,7 @@ public: double val(); String *val_str(String*); void fix_length_and_dec(); + void print(String *str); friend class select_exists_subselect; friend class subselect_uniquesubquery_engine; @@ -184,12 +181,15 @@ protected: Item_in_optimizer *optimizer; bool was_null; bool abort_on_null; + bool transformed; public: Item_func_not_all *upper_not; // point on NOT before ALL subquery Item_in_subselect(Item * left_expr, st_select_lex *select_lex); Item_in_subselect() - :Item_exists_subselect(), abort_on_null(0), upper_not(0) {} + :Item_exists_subselect(), abort_on_null(0), transformed(0), upper_not(0) + + {} subs_type substype() { return IN_SUBS; } void reset() @@ -209,6 +209,7 @@ public: String *val_str(String*); void top_level_item() { abort_on_null=1; } bool test_limit(st_select_lex_unit *unit); + void print(String *str); friend class Item_ref_null_helper; friend class Item_is_not_null_test; @@ -223,12 +224,15 @@ protected: compare_func_creator func; public: + bool all; + Item_allany_subselect(Item * left_expr, compare_func_creator f, - st_select_lex *select_lex); + st_select_lex *select_lex, bool all); // only ALL subquery has upper not subs_type substype() { return upper_not?ALL_SUBS:ANY_SUBS; } trans_res select_transformer(JOIN *join); + void print(String *str); }; @@ -264,6 +268,7 @@ public: enum Item_result type() { return res_type; } virtual void exclude()= 0; bool may_be_null() { return maybe_null; }; + virtual void print(String *str)= 0; }; @@ -285,6 +290,7 @@ public: bool dependent(); bool uncacheable(); void exclude(); + void print (String *str); }; @@ -302,6 +308,7 @@ public: bool dependent(); bool uncacheable(); void exclude(); + void print (String *str); }; @@ -328,6 +335,7 @@ public: bool dependent() { return 1; } bool uncacheable() { return 1; } void exclude(); + void print (String *str); }; @@ -344,4 +352,5 @@ public: check_null(chk_null) {} int exec(); + void print (String *str); }; |