My favorites | Sign in
Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 1: executeBatch in StatementSpy doesnt clean batched statements
3 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Feb 2009
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by Daniel.Doubleday, Dec 08, 2008
What steps will reproduce the problem?
1. Create PreparedStatement
2. add batch
3. execute
4. add another batch
5. execute

What is the expected output? What do you see instead?
I expected to see execute 3 and execute 4 seperatly but I get 3+4 in execute 4


Comment 1 by arthur.blake, Feb 26, 2009
This feature has been added to log4jdbc 1.2 alpha 2 - would appreciate a message back 
from you after testing/using this feature.
Status: Fixed
Comment 2 by t....@gmx.de, Aug 19, 2009
I find the JDBC Javadoc inaccurate, but if Informix is right, the batch must also be
cleared if realStatement.executeBatch() throws an exception. 

Informix 3.50.JC3 does clear the batch. From my test program's log (using a
PreparedStatement with two parameters):
  DEBUG|util.DbBatchStatement|batch params before executeBatch: [5, g, 6, h]
  INFO |jdbc.sqlonly|batching 21 statements:
I.e. the real PrepStmt had params for two commands, and log4jdbc still thought there
were 21. (DbBatchStatement is a utility that continuously re-adds the commands that
the underlying PrepStmt left out after an exception, until all commands have been
executed.)

DbBatchStatementTest.log
14.3 KB Download
Sign in to add a comment

Hosted by Google Code