Bug #41161 PreparedStatement.addBatch() does not check for all parameters being set

Submitted: 1 Dec 2008 21:33 Modified: 9 Dec 2008 14:35
Reporter: Mark Matthews Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Severity:S2 (Serious)
Version:All OS:Any
Assigned to: Mark Matthews CPU Architecture:Any

[1 Dec 2008 21:33] Mark Matthews
Description:
PreparedStatement.addBatch() does not check for all parameters being set, which leads to inconsistent behavior in executeBatch(), especially when rewriting batched statements into multi-value INSERTs.

How to repeat:
Create a prepared statement, don't set all of the parameters, call addBatch() and attempt to execute it on a connection that has been configured to rewrite batched statements....NPE ensues.
[1 Dec 2008 21:55] Mark Matthews
Fixed for 5.1.8.
[9 Dec 2008 14:35] Tony Bedford
An entry was added to the 5.1.8 changelog:

PreparedStatement.addBatch() did not check for all parameters being set, which led to inconsistent behavior in executeBatch(), especially when rewriting batched statements into multi-value INSERTs.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.037 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.