diff options
author | bell@sanja.is.com.ua <> | 2002-12-19 07:38:32 +0200 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2002-12-19 07:38:32 +0200 |
commit | b785e980bd2436e5892db2b9502a66841ae438e7 (patch) | |
tree | d6a9853b982008a3229e5bf8136a0dde76ccf4a2 /sql/sql_class.cc | |
parent | b96a17a81790cafcd62dd0ad31bb956f97bf7fb7 (diff) | |
download | mariadb-git-b785e980bd2436e5892db2b9502a66841ae438e7.tar.gz |
optimized single value subselect (to be used as row) (SCRUM)
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 9e0489edb28..50164aed342 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -932,31 +932,7 @@ bool select_singleval_subselect::send_data(List<Item> &items) } List_iterator_fast<Item> li(items); Item *val_item= li++; // Only one (single value subselect) - /* - Following val() call have to be first, because function AVG() & STD() - calculate value on it & determinate "is it NULL?". - */ - it->real_value= val_item->val_result(); - if ((it->null_value= val_item->null_value)) - { - it->reset(); - } - else - { - it->max_length= val_item->max_length; - it->decimals= val_item->decimals; - it->set_charset(val_item->charset()); - it->int_value= val_item->val_int_result(); - String *s= val_item->str_result(&it->string_value); - if (s != &it->string_value) - { - it->string_value.set(*s, 0, s->length()); - } - // TODO: remove when correct charset handling appeared for Item - it->str_value.set(*s, 0, s->length()); // store charset - - it->res_type= val_item->result_type(); - } + it->store(val_item); it->assigned(1); DBUG_RETURN(0); } |