未验证 提交 9ec0b144 编写于 作者: H huolibo 提交者: GitHub

fix: jni add error code msg (#18699)

上级 4259603c
...@@ -120,7 +120,7 @@ int32_t check_for_params(jobject jobj, jlong conn, jlong res) { ...@@ -120,7 +120,7 @@ int32_t check_for_params(jobject jobj, jlong conn, jlong res) {
} }
if ((TAOS_RES *)res == NULL) { if ((TAOS_RES *)res == NULL) {
jniError("jobj:%p, conn:%p, res is null", jobj, (TAOS *)conn); jniError("jobj:%p, conn:%p, param res is null", jobj, (TAOS *)conn);
return JNI_RESULT_SET_NULL; return JNI_RESULT_SET_NULL;
} }
...@@ -395,8 +395,8 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_freeResultSetImp( ...@@ -395,8 +395,8 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_freeResultSetImp(
return code; return code;
} }
taos_free_result((void *)res);
jniDebug("jobj:%p, conn:%p, free resultset:%p", jobj, (TAOS *)con, (void *)res); jniDebug("jobj:%p, conn:%p, free resultset:%p", jobj, (TAOS *)con, (void *)res);
taos_free_result((void *)res);
return JNI_SUCCESS; return JNI_SUCCESS;
} }
...@@ -491,7 +491,7 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_fetchRowImp(JNIEn ...@@ -491,7 +491,7 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_fetchRowImp(JNIEn
numOfFields); numOfFields);
return JNI_FETCH_END; return JNI_FETCH_END;
} else { } else {
jniDebug("jobj:%p, conn:%p, interrupted query", jobj, tscon); jniDebug("jobj:%p, conn:%p, interrupted query. fetch row error code: %d, msg:%s", jobj, tscon, code, taos_errstr(result));
return JNI_RESULT_SET_NULL; return JNI_RESULT_SET_NULL;
} }
} }
...@@ -587,7 +587,7 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_fetchBlockImp(JNI ...@@ -587,7 +587,7 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_fetchBlockImp(JNI
numOfFields); numOfFields);
return JNI_FETCH_END; return JNI_FETCH_END;
} else { } else {
jniDebug("jobj:%p, conn:%p, query interrupted", jobj, tscon); jniError("jobj:%p, conn:%p, query interrupted. fetch block error code:%d, msg:%s", jobj, tscon, code, taos_errstr(tres));
return JNI_RESULT_SET_NULL; return JNI_RESULT_SET_NULL;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册