diff --git a/sql/item_sum.cc b/sql/item_sum.cc index ae0559e2249..e3524083354 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -188,7 +188,7 @@ 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;