mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix for bug#18281 group_concat changes charset to binary
skip charset aggregation for order columns
This commit is contained in:
@ -626,3 +626,8 @@ latin1
|
|||||||
latin1
|
latin1
|
||||||
drop table t1, t2, t3;
|
drop table t1, t2, t3;
|
||||||
set names default;
|
set names default;
|
||||||
|
create table t1 (c1 varchar(10), c2 int);
|
||||||
|
select charset(group_concat(c1 order by c2)) from t1;
|
||||||
|
charset(group_concat(c1 order by c2))
|
||||||
|
latin1
|
||||||
|
drop table t1;
|
||||||
|
@ -414,3 +414,11 @@ select charset(a) from t2;
|
|||||||
select charset(a) from t3;
|
select charset(a) from t3;
|
||||||
drop table t1, t2, t3;
|
drop table t1, t2, t3;
|
||||||
set names default;
|
set names default;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#18281 group_concat changes charset to binary
|
||||||
|
#
|
||||||
|
create table t1 (c1 varchar(10), c2 int);
|
||||||
|
select charset(group_concat(c1 order by c2)) from t1;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
@ -3226,7 +3226,10 @@ Item_func_group_concat::fix_fields(THD *thd, Item **ref)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (agg_item_charsets(collation, func_name(),
|
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;
|
return 1;
|
||||||
|
|
||||||
result.set_charset(collation.collation);
|
result.set_charset(collation.collation);
|
||||||
|
Reference in New Issue
Block a user