我必须增加group_concat_max_len。
我无法通过preparestatement 做到这一点,而且我也无法在mysql my.conf 文件中做到这一点。
我在 mysql 文档中发现有一个选项可以在 url 中传递会话变量。
但没有例子,我尝试这样做:
jdbc.url=jdbc:mysql://xxxx.xx.xx.xx/dbName?sessionVariables=group_concat_max_len:204800
我有一个例外:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':204800' at line 1
我也尝试过这样的:
jdbc.url=jdbc:mysql://xxxx.xx.xx.xx/dbName?sessionVariables=group_concat_max_len,204800
因为官方文档说:
sessionVariables
A comma-separated list of name/value pairs to be sent as SET SESSION ... to the server when the driver connects.
Since version: 3.1.8
有任何想法吗???
尝试这个:
jdbc.url=jdbc:mysql://xxxx.xx.xx.xx/dbName?sessionVariables=group_concat_max_len=204800
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)