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

ResultSet of type CLOSE_CURSORS_AT_COMMIT isn't closed on commit [JDBC307] #353

Closed
firebird-issue-importer opened this issue Mar 30, 2013 · 20 comments

Comments

@firebird-issue-importer

Submitted by: @mrotteveel

Is related to JDBC305
Relate to JDBC400
Relate to JDBC401
Relate to JDBC348

ResultSet of type CLOSE_CURSORS_AT_COMMIT isn't closed on commit when autocommit is disabled.

Subsequent execution of for example rs.next() will result in an exception from the server:
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544569. Dynamic SQL Error
SQL error code = -504
Invalid cursor reference
Cursor is not open

Instead of the expected message "The result set is closed" from method checkCursorMove(). For a scrollable (== cached) resultset, the user can continue scrolling after commit when the resultset should report "The result set is closed" as well.

Commits: c3bcc42 8b7a8cc

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 30, 2013

Modified by: @mrotteveel

Fix Version: Jaybird 2.2.3 [ 10510 ]

Fix Version: Jaybird 2.3 [ 10440 ]

description: ResultSet of type CLOSE_CURSORS_AT_COMMIT isn't closed on commit when autocommit is disabled. => ResultSet of type CLOSE_CURSORS_AT_COMMIT isn't closed on commit when autocommit is disabled.

Subsequent execution of for example rs.next() will result in a
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544569. Dynamic SQL Error
SQL error code = -504
Invalid cursor reference
Cursor is not open

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 30, 2013

Modified by: @mrotteveel

Link: This issue is related to JDBC209 [ JDBC209 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 30, 2013

Modified by: @mrotteveel

Link: This issue is related to JDBC209 [ JDBC209 ] =>

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 30, 2013

Modified by: @mrotteveel

Link: This issue is related to JDBC306 [ JDBC306 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 30, 2013

Modified by: @mrotteveel

Link: This issue is related to JDBC306 [ JDBC306 ] =>

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 30, 2013

Modified by: @mrotteveel

Link: This issue is related to JDBC305 [ JDBC305 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 30, 2013

Commented by: @mrotteveel

Deferring to Jaybird 2.3. Fixing this requires a big overhaul of how commit is signaled to the various parts of Jaybird (without resorting to a big kludge) and this essentially has been broken at least since Jaybird 2.1.x.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 30, 2013

Modified by: @mrotteveel

Fix Version: Jaybird 2.2.3 [ 10510 ] =>

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 13, 2013

Modified by: @mrotteveel

description: ResultSet of type CLOSE_CURSORS_AT_COMMIT isn't closed on commit when autocommit is disabled.

Subsequent execution of for example rs.next() will result in a
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544569. Dynamic SQL Error
SQL error code = -504
Invalid cursor reference
Cursor is not open

=>

ResultSet of type CLOSE_CURSORS_AT_COMMIT isn't closed on commit when autocommit is disabled.

Subsequent execution of for example rs.next() will result in an exception from the server:
org.firebirdsql.jdbc.FBSQLException: GDS Exception. 335544569. Dynamic SQL Error
SQL error code = -504
Invalid cursor reference
Cursor is not open

Instead of the expected message "The result set is closed" from method checkCursorMove(). For a scrollable (== cached) resultset, the user can continue scrolling after commit when the resultset should report "The result set is closed" as well.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 5, 2015

Modified by: @mrotteveel

Link: This issue relate to JDBC400 [ JDBC400 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 5, 2015

Commented by: @mrotteveel

Given JDBC400, the implications of this bug seem to be bigger. Tentatively scheduling for version 2.2.9.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 5, 2015

Modified by: @mrotteveel

Fix Version: Jaybird 2.2.9 [ 10691 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 25, 2015

Commented by: @mrotteveel

While working on JDBC399 I found a fix for this.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 25, 2015

Commented by: @mrotteveel

It looks like the bug was somewhat intentional: not closing the result set has a performance benefit: the server side cursor is closed by the commit, completing the statement before the commit will do a network roundtrip to explicitly close the cursor. I will need to keep the performance benefit of the bug without the incorrect result set behavior.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 2, 2015

Commented by: @mrotteveel

Made some changes to not free the serverside cursor before commit. This works, but it is a bit of a tangle. I will need to see if I can change this to be a more localized solution in Jaybird 3 (or 3.1) without having to go through several layers of indirection.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 11, 2015

Modified by: @mrotteveel

Link: This issue relate to JDBC401 [ JDBC401 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 11, 2015

Commented by: @mrotteveel

Fix committed:
master: c3bcc42
Branch_2_2: 8b7a8cc

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 11, 2015

Modified by: @mrotteveel

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

resolution: Fixed [ 1 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jul 24, 2015

Modified by: @mrotteveel

Link: This issue relate to JDBC348 [ JDBC348 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Oct 19, 2015

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