summaryrefslogtreecommitdiff
path: root/sql/item_subselect.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r--sql/item_subselect.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index cd78edfee7b..26f8313159f 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -759,6 +759,7 @@ static Item_result set_row(SELECT_LEX *select_lex, Item * item,
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 (select_lex->item_list.elements > 1)
@@ -770,6 +771,7 @@ void subselect_single_select_engine::fix_length_and_dec(Item_cache **row)
{
DBUG_ASSERT(row || select_lex->item_list.elements==1);
res_type= set_row(select_lex, item, row, &maybe_null);
+ item->collation.set(row[0]->collation);
if (cols() != 1)
maybe_null= 0;
}