-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sharding-sphere3.0.0+mybatisplus2.1.4+mysql, batchInsert error, help me !!! #8577
Comments
private int[] accumulate(final List<int[]> results) { |
I don't know what is mybatis-plus, could you get the actual SQL and jdbc method? |
It's a framework based on mybatis https://github.com/baomidou/mybatis-plus (MyBatis-Plus is an powerful enhanced toolkit of MyBatis for simplify development. This toolkit provides some efficient, useful, out-of-the-box features for MyBatis, use it can effectively save your development time.). |
for example, i call mybatis-plus's method ExampleService.insertBatch(list). when list's size is 10, sharding-sphere will put the same table data in one sql. such like '' insert into table values(),()"". then look the method i said above "accumulate", each.getJdbcAndActualAddBatchCallTimesMap().entrySet() ’s size is 2。but when i debug the param "final List<int[]> results" of the method "accumulate" , i get the param int[] 'size is 1, so throw java.lang.ArrayIndexOutOfBoundsException:1 |
It is recommended that you first check whether the SQL is correct, so please provide your actual SQL, not the Java code. |
Closed because of no response |
Question
Error flushing statements. Cause: java.lang.ArrayIndexOutOfBoundsException: 1
Cause: java.lang.ArrayIndexOutOfBoundsException: 1
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at io.shardingsphere.shardingjdbc.executor.BatchPreparedStatementExecutor.accumulate(BatchPreparedStatementExecutor.java:176)
at io.shardingsphere.shardingjdbc.executor.BatchPreparedStatementExecutor.executeBatch(BatchPreparedStatementExecutor.java:168)
at io.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.executeBatch(ShardingPreparedStatement.java:236)
The text was updated successfully, but these errors were encountered: