diff options
author | unknown <ram@gw.mysql.r18.ru> | 2004-01-19 13:00:51 +0400 |
---|---|---|
committer | unknown <ram@gw.mysql.r18.ru> | 2004-01-19 13:00:51 +0400 |
commit | 2f7bf967fd5510822627b60fa79d4117d1439f7a (patch) | |
tree | c0461a29324b83e45db0b1fb3e5fd3b5e1fda519 /sql/item_subselect.cc | |
parent | d89fd8281bb6795da5d897561fb19e19a631ce0e (diff) | |
parent | a4be3840a37dcb24530f895f7a46080fed570874 (diff) | |
download | mariadb-git-2f7bf967fd5510822627b60fa79d4117d1439f7a.tar.gz |
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into gw.mysql.r18.ru:/usr/home/ram/work/4.1.b2182
client/mysqldump.c:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r-- | sql/item_subselect.cc | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 0380cd2c6cc..ee034e4c559 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -301,8 +301,6 @@ void Item_singlerow_subselect::fix_length_and_dec() if ((max_columns= engine->cols()) == 1) { engine->fix_length_and_dec(row= &value); - if (!(value= Item_cache::get_cache(engine->type()))) - return; } else { @@ -956,13 +954,9 @@ static Item_result set_row(List<Item> &item_list, Item *item, res_type= sel_item->result_type(); item->decimals= sel_item->decimals; *maybe_null= sel_item->maybe_null; - if (row) - { - if (!(row[i]= Item_cache::get_cache(res_type))) - return STRING_RESULT; // we should return something - row[i]->set_len_n_dec(sel_item->max_length, sel_item->decimals); - row[i]->collation.set(sel_item->collation); - } + if (!(row[i]= Item_cache::get_cache(res_type))) + return STRING_RESULT; // we should return something + row[i]->setup(sel_item); } if (item_list.elements > 1) res_type= ROW_RESULT; @@ -983,7 +977,10 @@ void subselect_union_engine::fix_length_and_dec(Item_cache **row) DBUG_ASSERT(row || unit->first_select()->item_list.elements==1); if (unit->first_select()->item_list.elements == 1) + { res_type= set_row(unit->types, item, row, &maybe_null); + item->collation.set(row[0]->collation); + } else { bool fake= 0; |