Kenny MacLeod (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557057%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNWFjOTMxMTY2...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-15735?atlOrigin=eyJpIjoiNWFjOT...
) HHH-15735 (
https://hibernate.atlassian.net/browse/HHH-15735?atlOrigin=eyJpIjoiNWFjOT...
) JDBC Connection leak in o.h.tool.schema.extract.spi.ExtractionContext (
https://hibernate.atlassian.net/browse/HHH-15735?atlOrigin=eyJpIjoiNWFjOT...
)
Issue Type: Bug Affects Versions: 5.6.10, 5.6.14 Assignee: Unassigned Created: 18/Nov/2022
12:54 PM Labels: schema-tooling tools Priority: Minor Reporter: Kenny MacLeod (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557057%...
)
The interface org.hibernate.tool.schema.extract.spi.ExtractionContext has a default
implementation of the getQueryResults method that appears to have a JDBC Connection leak:
try (PreparedStatement statement = getJdbcConnection().prepareStatement( queryString )) {
......
}
Note that the Statement is managed by the try block, but the getJdbcConnection is not.
I spotted this by running tests that use the Schema extraction stuff, and I eventually ran
out of connections due to this.
(
https://hibernate.atlassian.net/browse/HHH-15735#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15735#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100210- sha1:9b34d7c )