Open lsz-clark opened 6 years ago
注意版本:
compile group: 'com.dangdang', name: 'sharding-jdbc-core', version: '1.3.1'
compile group: 'com.dangdang', name: 'sharding-jdbc-transaction-storage', version: '1.3.1'
compile group: 'com.dangdang', name: 'sharding-jdbc-config-spring', version: '1.3.1'
我用demo里的1.3.1是可以, 用更高的版本就会出现批量插入出错.
确实,但现在sharding-sphere是支持批量插入了
是的,我昨天试了. 用Sharding-sphere 纯JDBC和JPA的批量插入都没有问题.
发件人:clark·lee notifications@github.com 发送时间:2018年8月15日(星期三) 10:14 收件人:yjmyzz/sharding-jdbc-sample sharding-jdbc-sample@noreply.github.com 抄 送:Hunter Chen hunter.chen@valorosoltd.com; Comment comment@noreply.github.com 主 题:Re: [yjmyzz/sharding-jdbc-sample] 使用druid数据源,sharding分库分表,批量插入出现如下错误,单笔是可以插入的,请帮忙分析下 (#2)
确实,但现在sharding-sphere是支持批量插入了 — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
xception in thread "main" org.springframework.jdbc.UncategorizedSQLException:
Error updating database. Cause: java.sql.SQLException: sql injection violation, syntax error: syntax error, expect ')', pos 86, line 1, column 65, token EOF : INSERT INTO t_order_00(order_id,user_id,
status
,tmCreate)valuesThe error may involve com.frxs.web.demo.mapper.OrderMapper.insertBatch-Inline
The error occurred while setting parameters
SQL: INSERT INTO
t_order
(order_id,user_id,status
,tmCreate)values (?,?,?,?) , (?,?,?,?) , (?,?,?,?) , (?,?,?,?) , (?,?,?,?) , (?,?,?,?) , (?,?,?,?)Cause: java.sql.SQLException: sql injection violation, syntax error: syntax error, expect ')', pos 86, line 1, column 65, token EOF : INSERT INTO t_order_00(order_id,user_id,
status
,tmCreate)values; uncategorized SQLException; SQL state [null]; error code [0]; sql injection violation, syntax error: syntax error, expect ')', pos 86, line 1, column 65, token EOF : INSERT INTO t_order_00(order_id,user_id,
status
,tmCreate)valuesxml: