From decfb9b50ba2891b09b13773022461bc759f511d Mon Sep 17 00:00:00 2001 From: slguan Date: Mon, 23 Sep 2019 15:57:32 +0800 Subject: [PATCH] fix issue #542 --- .../src/main/java/com/taosdata/jdbc/TSDBJNIConnector.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBJNIConnector.java b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBJNIConnector.java index 6f305cc2c7..ff0ea4238e 100755 --- a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBJNIConnector.java +++ b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBJNIConnector.java @@ -183,7 +183,9 @@ public class TSDBJNIConnector { res = this.freeResultSetImp(this.taos, result); isResultsetClosed = true; // reset resultSetPointer to 0 after freeResultSetImp() return taosResultSetPointer = TSDBConstants.JNI_NULL_POINTER; - } + } else { + isResultsetClosed = true; + } return res; } @@ -197,6 +199,7 @@ public class TSDBJNIConnector { if (!isResultsetClosed) { resCode = this.freeResultSetImp(this.taos, this.taosResultSetPointer); taosResultSetPointer = TSDBConstants.JNI_NULL_POINTER; + isResultsetClosed = true; } return resCode; } -- GitLab