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

A JDBC connection should have a reset method to reset it to the original state #1116

Open
olavloite opened this issue Feb 2, 2023 · 0 comments · May be fixed by googleapis/java-spanner#3142
Assignees
Labels
api: spanner Issues related to the googleapis/java-spanner-jdbc API.

Comments

@olavloite
Copy link
Collaborator

Applications that use a connection pool might set certain properties on a JDBC connection. These will 'leak' to other users of the same session pool if the user does not reset the connection manually. Having a generic reset method will make this easier for users.

Unfortunately there is no generic reset method in the JDBC API.

There should also be a SQL command that can do the same, so it can be registered as a reset SQL command in the connection pool

@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/java-spanner-jdbc API. label Feb 2, 2023
@rajatbhatta rajatbhatta assigned olavloite and unassigned rajatbhatta Jul 11, 2023
olavloite added a commit to googleapis/java-spanner that referenced this issue May 31, 2024
Adds support for the RESET ALL statement to the Connection
API. This allows users to easily reset a connection to its
original state, for example before returning a connection
to a pool, or after retrieving a connection from a pool.

Fixes googleapis/java-spanner-jdbc#1116
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/java-spanner-jdbc API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants