fix(client): set the initial value for num_of_rows.
This commit is contained in:
parent
970155a845
commit
1b219f7a66
|
@ -581,8 +581,8 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_fetchBlockImp(JNI
|
|||
return JNI_RESULT_SET_NULL;
|
||||
}
|
||||
|
||||
void *data;
|
||||
int32_t numOfRows;
|
||||
void *data = NULL;
|
||||
int32_t numOfRows = 0;
|
||||
int error_code = taos_fetch_raw_block(tres, &numOfRows, &data);
|
||||
if (numOfRows == 0) {
|
||||
if (error_code == JNI_SUCCESS) {
|
||||
|
|
|
@ -611,6 +611,9 @@ int taos_fetch_block_s(TAOS_RES *res, int *numOfRows, TAOS_ROW *rows) {
|
|||
}
|
||||
|
||||
int taos_fetch_raw_block(TAOS_RES *res, int *numOfRows, void **pData) {
|
||||
*numOfRows = 0;
|
||||
*pData = NULL;
|
||||
|
||||
if (res == NULL || TD_RES_TMQ_META(res)) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -361,8 +361,8 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_tmq_TMQConnector_fetchRawBlockImp(
|
|||
|
||||
TAOS_RES *tres = (TAOS_RES *)res;
|
||||
|
||||
void *data;
|
||||
int32_t numOfRows;
|
||||
void *data = NULL;
|
||||
int32_t numOfRows = 0;
|
||||
int error_code = taos_fetch_raw_block(tres, &numOfRows, &data);
|
||||
if (numOfRows == 0) {
|
||||
if (error_code == JNI_SUCCESS) {
|
||||
|
|
Loading…
Reference in New Issue