summaryrefslogtreecommitdiff
path: root/sql/item_sum.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_sum.cc')
-rw-r--r--sql/item_sum.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index ae0559e2249..ca6f17d486a 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -188,12 +188,13 @@ Item_sum_hybrid::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
max_length=float_length(decimals);
else
{
- str_cmp_function= binary() ? stringcmp : sortcmp;
+ str_cmp_function= item->binary() ? stringcmp : sortcmp;
max_length=item->max_length;
}
decimals=item->decimals;
maybe_null=item->maybe_null;
unsigned_flag=item->unsigned_flag;
+ set_charset(item->charset());
result_field=0;
null_value=1;
fix_length_and_dec();