【BUG之group_concat默认长度限制】

问题:mysql数据库使用group_concat将多个id组成字符串数组,一共200个,到160个被截断;mysql

缘由:mysql的group_concat默认链接长度为1024字符,也就是说你须要链接后的链接超过1024字符,它只会显示这么长,其他部分都会被截取丢掉。sql

解决方案:数据库

一、设置临时会话,扩展长度数组

SET GLOBAL group_concat_max_len=102400; SET SESSION group_concat_max_len=102400;字符串

二、mysql 修改配置文件扩展

group_concat_max_len = 102400;配置

相关文章
相关标签/搜索