select aid,group_concat(bid order by bid separator ',') as bid_str from tbl group by aid;
SET GLOBAL group_concat_max_len = 1024;
show variables like "group_concat_max_len";
select aid,group_concat(bid order by bid separator ',') as bid_str from tbl group by aid;
SET GLOBAL group_concat_max_len = 1024;
show variables like "group_concat_max_len";