-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Statement leak in Trino JDBC DatabaseMetaData
Before the change, Trino JDBC's `DatabaseMetaData` implementation (`TrinoDatabaseMetaData`) would create `Statement` objects that are never closed. Since `Connection` (`TrinoConnection`) tracks open statements to be able to close them upon `Connection.close()` (per JDBC requirements), this created a memory leak where `Statement` objects are leaked in `Connection.statements` collection. The commit fixing this, under the condition that `ResultSet` returned from `TrinoDatabaseMetaData` is correctly closed.
- Loading branch information
Showing
4 changed files
with
100 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters