Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw explicit exception when trying to use batched execution with prepared statement with generated keys option [JDBC451] #491

Closed
firebird-issue-importer opened this issue Sep 10, 2016 · 6 comments

Comments

@firebird-issue-importer

Submitted by: @mrotteveel

Is related to JDBC452

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()?)

Commits: 6b9c43c bdc6c4c

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 10, 2016

Commented by: @mrotteveel

Only fix in 2.2.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 10, 2016

Modified by: @mrotteveel

Fix Version: Jaybird 2.2.12 [ 10781 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Oct 1, 2016

Modified by: @mrotteveel

Link: This issue is related to JDBC452 [ JDBC452 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Oct 1, 2016

Commented by: @mrotteveel

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.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Oct 1, 2016

Modified by: @mrotteveel

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 18, 2016

Modified by: @mrotteveel

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants