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

Statement + ResultSet setFetchDirection should ignore FETCH_REVERSE and FETCH_UNKNOWN instead of throwing an exception [JDBC475] #514

Closed
firebird-issue-importer opened this issue Jan 28, 2017 · 5 comments

Comments

@firebird-issue-importer

Submitted by: @mrotteveel

Statement + ResultSet setFetchDirection should ignore FETCH_REVERSE and FETCH_UNKNOWN instead of throwing an exception

See also section 13.5 of JDBC 4.2:

"Hints provided to the driver via this interface may be ignored by the driver if they are not appropriate."

Commits: c6c78da

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 28, 2017

Modified by: @mrotteveel

description: Statement + ResultSet setFetchDirection should ignore FETCH_REVERSE and FETCH_UNKNOWN instead of throwing an exception

Maybe register a warning on the statement.

=>

Statement + ResultSet setFetchDirection should ignore FETCH_REVERSE and FETCH_UNKNOWN instead of throwing an exception

Maybe register a warning on the statement.

See also section 13.5 of JDBC 4.2:

"Hints provided to the driver via this interface may be ignored by the driver if they are not appropriate."

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 28, 2017

Modified by: @mrotteveel

description: Statement + ResultSet setFetchDirection should ignore FETCH_REVERSE and FETCH_UNKNOWN instead of throwing an exception

Maybe register a warning on the statement.

See also section 13.5 of JDBC 4.2:

"Hints provided to the driver via this interface may be ignored by the driver if they are not appropriate."

=>

Statement + ResultSet setFetchDirection should ignore FETCH_REVERSE and FETCH_UNKNOWN instead of throwing an exception

See also section 13.5 of JDBC 4.2:

"Hints provided to the driver via this interface may be ignored by the driver if they are not appropriate."

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 28, 2017

Commented by: @mrotteveel

FETCH_REVERSE and FETCH_UNKNOWN are now always allowed on statement, and inherited by the result set. FETCH_REVERSE and FETCH_UNKNOWN are now allowed to be set on a scrollable result set.

The JDBC spec is a bit ambiguous about it, so setting FETCH_REVERSE and FETCH_UNKNOWN is allowed on a non-scrollable statement, and will be inherited as such by the non-scrollable result set, but setting that same value explicitly on a non-scrollable result set itself is not allowed and will throw an exception. This is similar to what the PostgreSQL JDBC driver does.

We ignore the hint entirely.

As part of this changed, calling get/setFetchDirection on a closed statement or closed result set will always result in an SQLException (this was done inconsistently).

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 28, 2017

Modified by: @mrotteveel

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

resolution: Fixed [ 1 ]

Fix Version: Jaybird 3.0.0-beta-3 [ 10806 ]

Fix Version: Jaybird 3.0.0 [ 10440 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Mar 5, 2017

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants