问题:使用spring jdbc 批量向mysql数据库插入数据库,一次一万条,报错信息如下:
SQL state [70100]; error code [1317]; Query execution was interrupted; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLQueryInterruptedException: Query execution was interrupted
使用的插入语句是
<sql id="batchInsert">
<![CDATA[
INSERT IGNORE
INTO
order(
row_key,
opr_id
)VALUES
<#list datas as r>
("${r['rowKey']}",
"${r['oprId']}"
)
<#if r_has_next>,</#if>
</#list>
]]>
</sql>
spring版本3.1.2
mysql版本5.7.19-17
搞不懂,只是插入数据,为什么会导致查询被打断,请问这种问题如何修改?