Mercurial > hg > monetdb-java
diff tests/JDBC_API_Tester.java @ 478:e239f02fe8b6
Add code to close the resultset after use to free resources on the server.
author | Martin van Dinther <martin.van.dinther@monetdbsolutions.com> |
---|---|
date | Tue, 01 Jun 2021 23:04:18 +0200 (2021-06-01) |
parents | 53911f29093c |
children | 076abe23e8a3 |
line wrap: on
line diff
--- a/tests/JDBC_API_Tester.java +++ b/tests/JDBC_API_Tester.java @@ -829,10 +829,13 @@ final public class JDBC_API_Tester { stmt = con.createStatement(); // query sys.types to find out if sql datatype hugeint is supported rs = stmt.executeQuery("SELECT sqlname from sys.types where sqlname = 'hugeint';"); - if (rs != null && rs.next()) { - String sqlname = rs.getString(1); - if ("hugeint".equals(sqlname)) - supportsHugeInt = true; + if (rs != null) { + if (rs.next()) { + if ("hugeint".equals(rs.getString(1))) + supportsHugeInt = true; + } + rs.close(); + rs = null; } } catch (SQLException e) { sb.append("FAILED: ").append(e.getMessage()).append("\n");