Issue Details (XML | Word | Printable)

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

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

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

Created: 29/Apr/18 10:50 AM   Updated: 06/Apr/19 10:59 AM
Component/s: JDBC driver
Affects Version/s: Jaybird 2.2.12, Jaybird 2.2.13, Jaybird 3.0.0, Jaybird 3.0.1, Jaybird 3.0.2, Jaybird 3.0.3, Jaybird 2.2.14, Jaybird 3.0.4, Jaybird 3.0.5
Fix Version/s: Jaybird 2.2.15, Jaybird 3.0.6, Jaybird 4

Issue Links:

 Description  « Hide
See (closed) ticket on

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

 All   Comments   Change History   Subversion Commits      Sort Order: Descending order - Click to sort in ascending order
Mark Rotteveel added a comment - 12/Sep/18 10:03 AM
Issue also affected Jaybird 2.2, where it would result in error "Attempt to reopen an open cursor".

Mark Rotteveel added a comment - 12/Sep/18 08:38 AM
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.