diff options
author | unknown <bell@sanja.is.com.ua> | 2002-10-27 23:27:00 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2002-10-27 23:27:00 +0200 |
commit | 0241d64b643ea0440d86b84196ae4df44b83978a (patch) | |
tree | ed757a6da8c6f840732c4df1f46db7ebd5e8e58c /sql/item.h | |
parent | 5a3fe219fb6e094f194f5dacf89020955db46c8e (diff) | |
download | mariadb-git-0241d64b643ea0440d86b84196ae4df44b83978a.tar.gz |
IN subselect
mysql-test/r/subselect.result:
IN subselect test
mysql-test/t/subselect.test:
IN subselect test
sql/item.cc:
Item wrappers for IN subselect
sql/item.h:
Item wrappers for IN subselect
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/sql/item.h b/sql/item.h index fc36148e443..2b92d7c9ed8 100644 --- a/sql/item.h +++ b/sql/item.h @@ -90,6 +90,55 @@ public: }; +/* + Wrapper base class +*/ + +class Item_wrapper :public Item +{ +protected: + Item *item; +public: + /* + Following methods should not be used, because fix_fields exclude this + item (it assign '*ref' with field 'item' in derived classes) + */ + enum Type type() const { return item->type(); } + double val() { return item->val(); } + longlong val_int() { return item->val_int(); } + String* val_str(String* s) { return item->val_str(s); } + void make_field(Send_field* f) { item->make_field(f); } +}; + + +/* + Save context of name resolution for Item, used in subselect transformer. +*/ +class Item_outer_select_context_saver :public Item_wrapper +{ + Item *item; +public: + Item_outer_select_context_saver(Item *i): + item(i) + { + } + bool fix_fields(THD *, struct st_table_list *, Item ** ref); +}; + +/* + To resolve '*' field moved to condition +*/ +class Item_asterisk_remover :public Item_wrapper +{ + Item *item; +public: + Item_asterisk_remover(Item *i): + item(i) + { + } + bool fix_fields(THD *, struct st_table_list *, Item ** ref); +}; + class st_select_lex; class Item_ident :public Item { |