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

Database handle not always invalidated + missing checks on invalid handle [JDBC313] #359

Closed
firebird-issue-importer opened this issue Jun 19, 2013 · 4 comments

Comments

@firebird-issue-importer

Submitted by: @mrotteveel

Jira_subtask_outward JDBC328

Not all areas of Jaybird check for database handle validity before continuing with an action that uses the database. An example of such problem is a NullPointerException in iscDatabaseInfo; See also Stackoverflow question http://stackoverflow.com/questions/17160036/error-using-jaybird-and-android

Looking at the code, the direct cause is a missing check on the handle validity. But a deeper look shows that the wire protocol implementation does not properly invalidate the handle, so even if it would have checked for validity before the action, the NPE would still have occurred.

Actions:
* Ensure invalidateHandle() is called when the connection is closed
* Add validity checks in all actions

Commits: 40fdb7b FirebirdSQL/fbt-repository@ca7c838

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 19, 2013

Commented by: @mrotteveel

Scheduled for 2.2.4, and 2.3 (although the new wireprotocol implementation will make that irrelevant).

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 19, 2013

Modified by: @mrotteveel

Fix Version: Jaybird 2.2.4 [ 10531 ]

Fix Version: Jaybird 2.3 [ 10440 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 22, 2013

Commented by: @mrotteveel

My assertion that the handle wasn't always invalidated was incorrect. I made validation of database, transaction, statement, blob and service handles more consistent for 2.2.4.

I am not going to port this to 2.3, as the new implementation works differently, I will keep this issue open as a reminder to thoroughly check this in the new implementation in 2.3.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 2, 2013

Modified by: @mrotteveel

status: Open [ 1 ] => Closed [ 6 ]

resolution: Fixed [ 1 ]

Fix Version: Jaybird 3.0 [ 10440 ] =>

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