diff options
author | unknown <bell@sanja.is.com.ua> | 2002-12-19 07:38:33 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2002-12-19 07:38:33 +0200 |
commit | 86ccbe3727e6200010d8b054e899ef0653f10672 (patch) | |
tree | 51f6bd86e6cb4b21fe76993f4959726de82d3d73 /sql/item_subselect.h | |
parent | ea4f406bafed272bf3517cbfd46dcc3091a2f1d6 (diff) | |
download | mariadb-git-86ccbe3727e6200010d8b054e899ef0653f10672.tar.gz |
support of simple row subselects (SCRUM)
mysql-test/r/subselect.result:
test of simple row subselect
fixed table droping
mysql-test/t/subselect.test:
test of simple row subselect
fixed table dropimg
sql/item.cc:
Item_cache_str fixed to correctly store NULL and copy string value
sql/item.h:
Item_cache_str fixed to correctly store NULL and copy string value
sql/item_cmpfunc.cc:
support of simple row subselects
sql/item_subselect.cc:
support of simple row subselects
sql/item_subselect.h:
support of simple row subselects
sql/sql_class.cc:
support of simple row subselects
Diffstat (limited to 'sql/item_subselect.h')
-rw-r--r-- | sql/item_subselect.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sql/item_subselect.h b/sql/item_subselect.h index a43caca22f2..3cb68cb3875 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -94,8 +94,7 @@ class Item_cache; class Item_singleval_subselect :public Item_subselect { protected: - Item_cache *value; - + Item_cache *value, **row; public: Item_singleval_subselect(THD *thd, st_select_lex *select_lex); Item_singleval_subselect(Item_singleval_subselect *item): @@ -106,7 +105,7 @@ public: decimals= item->decimals; } void reset(); - void store(Item* item); + void store(uint i, Item* item); double val(); longlong val_int (); String *val_str (String *); @@ -114,6 +113,13 @@ public: enum Item_result result_type() const; void fix_length_and_dec(); + uint cols(); + Item* el(uint i) { return (Item*)row[i]; } + Item** addr(uint i) { return (Item**)row + i; } + bool check_cols(uint c); + bool null_inside(); + void bring_value(); + friend class select_singleval_subselect; }; @@ -212,7 +218,7 @@ public: } virtual int prepare()= 0; - virtual void fix_length_and_dec()= 0; + virtual void fix_length_and_dec(Item_cache** row)= 0; virtual int exec()= 0; virtual uint cols()= 0; /* return number of columnss in select */ virtual bool depended()= 0; /* depended from outer select */ @@ -233,7 +239,7 @@ public: select_subselect *result, Item_subselect *item); int prepare(); - void fix_length_and_dec(); + void fix_length_and_dec(Item_cache** row); int exec(); uint cols(); bool depended(); @@ -250,7 +256,7 @@ public: select_subselect *result, Item_subselect *item); int prepare(); - void fix_length_and_dec(); + void fix_length_and_dec(Item_cache** row); int exec(); uint cols(); bool depended(); |