在mysql中进行批量插入的时候报错:
Exception in thread "main" java.sql.BatchUpdateException: Failed to read auto-increment value from storage engine
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1666)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1082)
at cn.itcast.jdbc.BatchTest.createBatch(BatchTest.java:59)
at cn.itcast.jdbc.BatchTest.main(BatchTest.java:18)
在我的数据库中user表中:主键id是自增的,为什么不能插入啊?
Exception in thread "main" java.sql.BatchUpdateException: Failed to read auto-increment value from storage engine
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1666)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1082)
at cn.itcast.jdbc.BatchTest.createBatch(BatchTest.java:59)
at cn.itcast.jdbc.BatchTest.main(BatchTest.java:18)
在我的数据库中user表中:主键id是自增的,为什么不能插入啊?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货