diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_sum.cc | 5 | ||||
-rw-r--r-- | sql/item_timefunc.cc | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 1cd1741cea6..8826144266e 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -3226,7 +3226,10 @@ Item_func_group_concat::fix_fields(THD *thd, Item **ref) } if (agg_item_charsets(collation, func_name(), - args, arg_count, MY_COLL_ALLOW_CONV)) + args, + /* skip charset aggregation for order columns */ + arg_count - arg_count_order, + MY_COLL_ALLOW_CONV)) return 1; result.set_charset(collation.collation); diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 63a7f1f130b..e139eba385e 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -2213,7 +2213,7 @@ longlong Item_extract::val_int() switch (int_type) { case INTERVAL_YEAR: return ltime.year; case INTERVAL_YEAR_MONTH: return ltime.year*100L+ltime.month; - case INTERVAL_QUARTER: return ltime.month/3 + 1; + case INTERVAL_QUARTER: return (ltime.month+2)/3; case INTERVAL_MONTH: return ltime.month; case INTERVAL_WEEK: { |