Skip to content

Fix close idempotency for JDBC PreparedStatement#17598

Closed
v-jizhang wants to merge 1 commit intoprestodb:masterfrom
v-jizhang:jdbc-close
Closed

Fix close idempotency for JDBC PreparedStatement#17598
v-jizhang wants to merge 1 commit intoprestodb:masterfrom
v-jizhang:jdbc-close

Conversation

@v-jizhang
Copy link
Copy Markdown
Contributor

Cherry-pick of trinodb/trino#11620
Fix the behavior of PreparedStatement.close() so that it may be called
multiple times without throwing an exception on subsequent invocations,
which is required per the JDBC specification:

Calling the method close on a Statement object that is already closed
has no effect.

Co-authored-by: David Phillips david@acz.org

Test plan - Added a test

== RELEASE NOTES ==

General Changes
* Fix close idempotency for JDBC PreparedStatement

Cherry-pick of trinodb/trino#11620

Fix the behavior of PreparedStatement.close() so that it may be called
multiple times without throwing an exception on subsequent invocations,
which is required per the JDBC specification:

Calling the method close on a Statement object that is already closed
has no effect.

Co-authored-by: David Phillips <david@acz.org>
@NikhilCollooru
Copy link
Copy Markdown
Contributor

This is already fixed in #17639. Will close this PR

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants