group_concat函数被截断问题

来源:互联网 发布:word mac破解版 编辑:程序博客网 时间:2024/06/05 03:39

今天在更新数据后,页面显示出错,经过检查发现是sql函数出现了截断问题.再精确定位后发现是调用了group_concat函数,而该函数发生了截断.


解决方式:

1.修改MySql配置文件:

group_concat_max_len = 5120

2.在自定义函数中设置group_concat_max_len大小:

SET GLOBAL group_concat_max_len=5120;SET SESSION group_concat_max_len=5120;

(注:GLOBAL需要管理员权限)

原创粉丝点击