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

Improve cursor close handling [JDBC573] #604

Closed
firebird-automations opened this issue Dec 29, 2018 · 6 comments
Closed

Improve cursor close handling [JDBC573] #604

firebird-automations opened this issue Dec 29, 2018 · 6 comments

Comments

@firebird-automations
Copy link

Submitted by: @mrotteveel

Is related to JDBC531
Is related to JDBC571

In JDBC571 we added some stopgap measures for CURSOR_OPEN state affecting reuse. We need to investigate if there is a better, more general solution possible. Part of the problem is that the driver relies (relied) on result set creation to properly close the statement cursor, while some code paths don't create a result set (or fail to create one, as addressed in JDBC571).

For example another codepath that causes this problem (which is corrected by the stopgap measure `ensureClosedCursor`) is executing a select with `Statement.execute(..)`, but never actually retrieving the result set with `getResultSet()`. Before the stopgap measure, this would leave the statement in CURSOR_OPEN state, disallowing reuse.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Fix Version: Jaybird 5 [ 10871 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

description: In JDBC571 we added some stopgap measures for CURSOR_OPEN state affecting reuse. We need to investigate if there is a better, more general solution possible. Part of the problem is that the driver relies (relied) on result set creation to properly closer the statement cursor, while some code paths don't create a result set (or fail to create on, as addressed in JDBC571).

For example another codepath that causes this problem (which is corrected by the stopgap measure `ensureClosedCursor`) is executing a select with `Statement.execute(..)`, but never actually retrieving the result set with `getResultSet()`. Before the stopgap measure, this would leave the statement in CURSOR_OPEN state, disallowing reuse.

=>

In JDBC571 we added some stopgap measures for CURSOR_OPEN state affecting reuse. We need to investigate if there is a better, more general solution possible. Part of the problem is that the driver relies (relied) on result set creation to properly closer the statement cursor, while some code paths don't create a result set (or fail to create one, as addressed in JDBC571).

For example another codepath that causes this problem (which is corrected by the stopgap measure `ensureClosedCursor`) is executing a select with `Statement.execute(..)`, but never actually retrieving the result set with `getResultSet()`. Before the stopgap measure, this would leave the statement in CURSOR_OPEN state, disallowing reuse.

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Link: This issue is related to JDBC531 [ JDBC531 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

Link: This issue is related to JDBC571 [ JDBC571 ]

@firebird-automations
Copy link
Author

Modified by: @mrotteveel

description: In JDBC571 we added some stopgap measures for CURSOR_OPEN state affecting reuse. We need to investigate if there is a better, more general solution possible. Part of the problem is that the driver relies (relied) on result set creation to properly closer the statement cursor, while some code paths don't create a result set (or fail to create one, as addressed in JDBC571).

For example another codepath that causes this problem (which is corrected by the stopgap measure `ensureClosedCursor`) is executing a select with `Statement.execute(..)`, but never actually retrieving the result set with `getResultSet()`. Before the stopgap measure, this would leave the statement in CURSOR_OPEN state, disallowing reuse.

=>

In JDBC571 we added some stopgap measures for CURSOR_OPEN state affecting reuse. We need to investigate if there is a better, more general solution possible. Part of the problem is that the driver relies (relied) on result set creation to properly close the statement cursor, while some code paths don't create a result set (or fail to create one, as addressed in JDBC571).

For example another codepath that causes this problem (which is corrected by the stopgap measure `ensureClosedCursor`) is executing a select with `Statement.execute(..)`, but never actually retrieving the result set with `getResultSet()`. Before the stopgap measure, this would leave the statement in CURSOR_OPEN state, disallowing reuse.

@mrotteveel
Copy link
Member

Promoted the stopgap to the definitive solution, removing the debug logging.

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

No branches or pull requests

2 participants