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

SQL Error: Statement state CURSOR_OPEN only allows next states [CLOSING, PREPARED, ERROR], received EXECUTING [JDBC531] #564

Closed
firebird-automations opened this issue Apr 29, 2018 · 8 comments

Comments

@firebird-automations
Copy link

Submitted by: @mrotteveel

Relate to JDBC573

See (closed) ticket on dbeaver/dbeaver#1844

This shouldn't be possible, but investigate if there is a way to trigger this (maybe the commit handling doesn't correctly switch the statement state in a close by commit situation?)

Commits: 89baee5 51097bc bb1f4e3

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 4 [ 10441 ]

Fix Version: Non-version tasks [ 10870 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

The problem can occur with cached fetching (metadata queries and holdable result sets) if an error occurs during fetch. The exception prevented the cursor from being closed. As those result sets are detached, the normal statement start (which closes open result sets), didn't affect the cursor, leaving the cursor open.

Fixed issue by closing the cursor in a finally block of the cached fetcher.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 3.0.6 [ 10883 ]

Component: JDBC driver [ 10053 ]

Fix Version: Non-version tasks [ 10870 ] =>

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

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

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Author

Commented by: @mrotteveel

Issue also affected Jaybird 2.2, where it would result in error "Attempt to reopen an open cursor".

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Version: Jaybird 3.0.5 [ 10873 ]

Version: Jaybird 3.0.4 [ 10861 ]

Version: Jaybird 2.2.14 [ 10820 ]

Version: Jaybird 2.2.13 [ 10805 ]

Version: Jaybird 2.2.12 [ 10781 ]

Fix Version: Jaybird 2.2.15 [ 10860 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Link: This issue relate to JDBC573 [ JDBC573 ]

@firebird-automations
Copy link
Author

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