diff options
author | bell@sanja.is.com.ua <> | 2002-10-27 23:27:00 +0200 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2002-10-27 23:27:00 +0200 |
commit | 07727576b8179eab503bcdaa2f3eafd64ffacf22 (patch) | |
tree | ed757a6da8c6f840732c4df1f46db7ebd5e8e58c /sql/item_subselect.h | |
parent | 8ec9edac5538830f52f0b5a2d3870d4417be0ce4 (diff) | |
download | mariadb-git-07727576b8179eab503bcdaa2f3eafd64ffacf22.tar.gz |
IN subselect
Diffstat (limited to 'sql/item_subselect.h')
-rw-r--r-- | sql/item_subselect.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h index 33f82982708..5a5f7bd58d8 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -55,13 +55,16 @@ public: pointer in constructor initialization list, but we need pass pointer to subselect Item class to select_subselect classes constructor. */ - void init (THD *thd, st_select_lex *select_lex, select_subselect *result); + virtual void init (THD *thd, st_select_lex *select_lex, + select_subselect *result, + Item *left_expr= 0); ~Item_subselect(); virtual void assign_null() { null_value= 1; } + virtual void select_transformer(st_select_lex *select_lex, Item *left_expr); bool assigned() { return value_assigned; } void assigned(bool a) { value_assigned= a; } enum Type type() const; @@ -74,7 +77,6 @@ public: friend class select_subselect; }; - /* single value subselect */ class Item_singleval_subselect :public Item_subselect @@ -127,12 +129,15 @@ protected: longlong value; /* value of this item (boolean: exists/not-exists) */ public: - Item_exists_subselect(THD *thd, st_select_lex *select_lex); + Item_exists_subselect(THD *thd, st_select_lex *select_lex, + Item *left_expr= 0); Item_exists_subselect(Item_exists_subselect *item): Item_subselect(item) { value= item->value; } + Item_exists_subselect(): Item_subselect() {} + virtual void assign_null() { value= 0; @@ -147,6 +152,16 @@ public: friend class select_exists_subselect; }; +/* IN subselect */ + +class Item_in_subselect :public Item_exists_subselect +{ +public: + Item_in_subselect(THD *thd, Item * left_expr, st_select_lex *select_lex); + Item_in_subselect(Item_in_subselect *item); + virtual void select_transformer(st_select_lex *select_lex, Item *left_exp); +}; + class subselect_engine { protected: |