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

Error "Current statement state (CURSOR_OPEN) does not allow call to prepare" when creating result set fails [JDBC571] #602

Closed
firebird-issue-importer opened this issue Dec 28, 2018 · 6 comments

Comments

@firebird-issue-importer

Submitted by: @mrotteveel

Relate to JDBC573

Running TestScalarTimeDateFunctions against Firebird 4 results in a reproducible case of "Current statement state (CURSOR_OPEN) does not allow call to prepare". The cause is similar to JDBC531, except in this case initialization of the fields in the result set constructor fails due to an unsupported datatype (eg TIMESTAMP WITH TIME ZONE). The failure to create the result set causes the result set to never be closed, and therefor the cursor state is never reset (and the serverside cursor never closed).

We need to carefully check if other types of exception can also lead to not properly closing result sets / cursors. We may also want to consider implementing a stopgap measure that prevents this problem from causing problems outside the driver (eg by forcibly resetting the statement if the state is CURSOR_OPEN). Maybe FBStatement.notifyStatementStarted should call something on FbStatement that forces a close if necessary.

Commits: 42ea403 072b83e

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 28, 2018

Commented by: @mrotteveel

NOTE: Jaybird 2.2 is probably also affected, but we're not going to fix it there.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 29, 2018

Modified by: @mrotteveel

Fix Version: Jaybird 3.0.6 [ 10883 ]

Fix Version: Jaybird 4 [ 10441 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 29, 2018

Commented by: @mrotteveel

Committed fix for 3.0.6 and 4

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 29, 2018

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 29, 2018

Modified by: @mrotteveel

Link: This issue relate to JDBC573 [ JDBC573 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 25, 2019

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