Bug #85317 | execute Batch will throw null pointer exception where the column is Blob! | ||
---|---|---|---|
Submitted: | 6 Mar 2017 8:07 | Modified: | 7 Apr 2022 22:21 |
Reporter: | David Gao | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | MySQL 5.6.35 Connector/J 5.1.40 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | batch, BLOB |
[6 Mar 2017 8:07]
David Gao
[6 Mar 2017 9:43]
Chiranjeevi Battula
Hello David Gao, Thank you for the bug report and test case. Verified this behavior on MySQL Connector / J 5.1.40. Thanks, Chiranjeevi.
[6 Mar 2017 9:43]
Chiranjeevi Battula
5.1.40 run: java.lang.NullPointerException at com.mysql.jdbc.PreparedStatement.computeMaxParameterSetSizeAndBatchSize(PreparedStatement.java:1666) at com.mysql.jdbc.PreparedStatement.computeBatchSize(PreparedStatement.java:1623) at com.mysql.jdbc.PreparedStatement.executeBatchedInserts(PreparedStatement.java:1490) at com.mysql.jdbc.PreparedStatement.executeBatchInternal(PreparedStatement.java:1248) at com.mysql.jdbc.StatementImpl.executeBatch(StatementImpl.java:958) at javaapplication3.bug_85317.main(bug_85317.java:33) BUILD SUCCESSFUL (total time: 2 seconds)
[7 Apr 2022 22:21]
Daniel So
Posted by developer: Added an entry to the Connector/J 8.0.29 changelog: "When the connection property rewriteBatchedStatements was set to true, inserting a BLOB using a prepared statement and executeBatch() resulted in a NullPointerException."