changeset 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 0e30bc245838
children 1c8b9aec43a6
files tests/JDBC_API_Tester.java
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
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");