Issue Details (XML | Word | Printable)

Key: JDBC-451
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Mark Rotteveel
Reporter: Mark Rotteveel
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Jaybird JCA/JDBC Driver

Throw explicit exception when trying to use batched execution with prepared statement with generated keys option

Created: 10/Sep/16 06:03 PM   Updated: 18/Dec/16 02:58 PM
Component/s: JDBC driver
Affects Version/s: Jaybird 2.2.11
Fix Version/s: Jaybird 2.2.12

Issue Links:
Relate
 


 Description  « Hide
Using batch execution with Statement.RETURN_GENERATED_KEYS (or one of the other generated keys options) in Jaybird 2.2 results in:

Exception in thread "main" java.sql.BatchUpdateException
at org.firebirdsql.jdbc.AbstractPreparedStatement.executeBatch(AbstractPreparedStatement.java:941)
at nl.lawinegevaar.fb.TestIdentityTable.main(TestIdentityTable.java:32)

We should throw an explicit exception that batch execution with generated keys is not supported (maybe already in addBatch()?)

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Mark Rotteveel added a comment - 10/Sep/16 06:04 PM
Only fix in 2.2.

Mark Rotteveel added a comment - 01/Oct/16 08:38 AM
Calls to addBatch() and executeBatch() on a FBPreparedStatement instance now throw a FBDriverNotCapableException when the statements was prepared with one of the generated keys options.