hello-friend 2018-10-24 09:07 采纳率: 100%
浏览 5778

Mysql批量插入,显示错误Query execution was interrupted

问题:使用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

搞不懂,只是插入数据,为什么会导致查询被打断,请问这种问题如何修改?
  • 写回答

2条回答 默认 最新

  • @菜鸟人生 2018-10-25 06:27
    关注

    不应该是insert into 表名 values()?

    评论

报告相同问题?