fix:[TD-31017]process return value in client
This commit is contained in:
parent
3e8daeeb91
commit
7cb5c2ef01
|
@ -484,7 +484,7 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_getSchemaMetaData
|
|||
(*env)->SetIntField(env, metadataObj, g_metadataColindexField, i);
|
||||
jstring metadataObjColname = (*env)->NewStringUTF(env, fields[i].name);
|
||||
(*env)->SetObjectField(env, metadataObj, g_metadataColnameField, metadataObjColname);
|
||||
(*env)->CallBooleanMethod(env, arrayListObj, g_arrayListAddFp, metadataObj);
|
||||
(void)(*env)->CallBooleanMethod(env, arrayListObj, g_arrayListAddFp, metadataObj);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -248,7 +248,7 @@ void monitorCreateClient(int64_t clusterId) {
|
|||
goto fail;
|
||||
}
|
||||
|
||||
taos_collector_registry_register_collector(pMonitor->registry, pMonitor->colector);
|
||||
(void)taos_collector_registry_register_collector(pMonitor->registry, pMonitor->colector);
|
||||
pMonitor->counters =
|
||||
(SHashObj*)taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), true, HASH_ENTRY_LOCK);
|
||||
if (pMonitor->counters == NULL) {
|
||||
|
@ -772,7 +772,7 @@ static int32_t tscMonitortInit() {
|
|||
return TSDB_CODE_TSC_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
taosThreadAttrDestroy(&thAttr);
|
||||
(void)taosThreadAttrDestroy(&thAttr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -164,18 +164,18 @@ int32_t processConnectRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
|||
}
|
||||
}
|
||||
|
||||
taosThreadMutexLock(&clientHbMgr.lock);
|
||||
(void)taosThreadMutexLock(&clientHbMgr.lock);
|
||||
SAppHbMgr* pAppHbMgr = taosArrayGetP(clientHbMgr.appHbMgrs, pTscObj->appHbMgrIdx);
|
||||
if (pAppHbMgr) {
|
||||
(void)hbRegisterConn(pAppHbMgr, pTscObj->id, connectRsp.clusterId, connectRsp.connType);
|
||||
} else {
|
||||
taosThreadMutexUnlock(&clientHbMgr.lock);
|
||||
(void)taosThreadMutexUnlock(&clientHbMgr.lock);
|
||||
code = TSDB_CODE_TSC_DISCONNECTED;
|
||||
setErrno(pRequest, code);
|
||||
(void)tsem_post(&pRequest->body.rspSem);
|
||||
goto End;
|
||||
}
|
||||
taosThreadMutexUnlock(&clientHbMgr.lock);
|
||||
(void)taosThreadMutexUnlock(&clientHbMgr.lock);
|
||||
|
||||
tscDebug("0x%" PRIx64 " clusterId:%" PRId64 ", totalConn:%" PRId64, pRequest->requestId, connectRsp.clusterId,
|
||||
pTscObj->pAppInfo->numOfConns);
|
||||
|
@ -184,7 +184,7 @@ int32_t processConnectRsp(void* param, SDataBuf* pMsg, int32_t code) {
|
|||
End:
|
||||
|
||||
if (pRequest) {
|
||||
releaseRequest(pRequest->self);
|
||||
(void)releaseRequest(pRequest->self);
|
||||
}
|
||||
|
||||
taosMemoryFree(param);
|
||||
|
|
|
@ -450,7 +450,7 @@ int32_t stmtCleanExecInfo(STscStmt* pStmt, bool keepTable, bool deepClean) {
|
|||
}
|
||||
|
||||
qDestroyStmtDataBlock(pBlocks);
|
||||
taosHashRemove(pStmt->exec.pBlockHash, key, keyLen);
|
||||
STMT_ERR_RET(taosHashRemove(pStmt->exec.pBlockHash, key, keyLen));
|
||||
|
||||
pIter = taosHashIterate(pStmt->exec.pBlockHash, pIter);
|
||||
}
|
||||
|
@ -640,7 +640,7 @@ int32_t stmtGetFromCache(STscStmt* pStmt) {
|
|||
|
||||
if (TSDB_CODE_PAR_TABLE_NOT_EXIST == code) {
|
||||
tscDebug("tb %s not exist", pStmt->bInfo.tbFName);
|
||||
stmtCleanBindInfo(pStmt);
|
||||
STMT_ERR_RET(stmtCleanBindInfo(pStmt));
|
||||
|
||||
STMT_ERR_RET(code);
|
||||
}
|
||||
|
@ -991,7 +991,7 @@ int stmtSetTbName(TAOS_STMT* stmt, const char* tbName) {
|
|||
STMT_ERR_RET(stmtSwitchStatus(pStmt, STMT_SETTBNAME));
|
||||
|
||||
int32_t insert = 0;
|
||||
stmtIsInsert(stmt, &insert);
|
||||
STMT_ERR_RET(stmtIsInsert(stmt, &insert));
|
||||
if (0 == insert) {
|
||||
tscError("set tb name not available for none insert statement");
|
||||
STMT_ERR_RET(TSDB_CODE_TSC_STMT_API_ERROR);
|
||||
|
@ -1161,7 +1161,7 @@ int32_t stmtAppendTablePostHandle(STscStmt* pStmt, SStmtQNode* param) {
|
|||
}
|
||||
|
||||
if (0 == pStmt->sql.siInfo.firstName[0]) {
|
||||
strcpy(pStmt->sql.siInfo.firstName, pStmt->bInfo.tbName);
|
||||
(void)strcpy(pStmt->sql.siInfo.firstName, pStmt->bInfo.tbName);
|
||||
}
|
||||
|
||||
param->tblData.getFromHash = pStmt->sql.siInfo.tbFromHash;
|
||||
|
@ -1248,8 +1248,8 @@ int stmtBindBatch(TAOS_STMT* stmt, TAOS_MULTI_BIND* bind, int32_t colIdx) {
|
|||
STMT_ERR_RET(qStmtParseQuerySql(&ctx, pStmt->sql.pQuery));
|
||||
|
||||
if (pStmt->sql.pQuery->haveResultSet) {
|
||||
setResSchemaInfo(&pStmt->exec.pRequest->body.resInfo, pStmt->sql.pQuery->pResSchema,
|
||||
pStmt->sql.pQuery->numOfResCols);
|
||||
STMT_ERR_RET(setResSchemaInfo(&pStmt->exec.pRequest->body.resInfo, pStmt->sql.pQuery->pResSchema,
|
||||
pStmt->sql.pQuery->numOfResCols));
|
||||
taosMemoryFreeClear(pStmt->sql.pQuery->pResSchema);
|
||||
setResPrecision(&pStmt->exec.pRequest->body.resInfo, pStmt->sql.pQuery->precision);
|
||||
}
|
||||
|
@ -1301,7 +1301,7 @@ int stmtBindBatch(TAOS_STMT* stmt, TAOS_MULTI_BIND* bind, int32_t colIdx) {
|
|||
// param->tblData.aCol = taosArrayInit(20, POINTER_BYTES);
|
||||
|
||||
param->restoreTbCols = false;
|
||||
strcpy(param->tblData.tbName, pStmt->bInfo.tbName);
|
||||
(void)strcpy(param->tblData.tbName, pStmt->bInfo.tbName);
|
||||
}
|
||||
|
||||
int64_t startUs3 = taosGetTimestampUs();
|
||||
|
|
|
@ -2940,7 +2940,7 @@ int32_t tmqGetNextResInfo(TAOS_RES* res, bool convertUcs4, SReqResultInfo** pRes
|
|||
doFreeReqResultInfo(&pRspObj->resInfo);
|
||||
SSchemaWrapper* pSW = (SSchemaWrapper*)taosArrayGetP(common->blockSchema, pRspObj->resIter);
|
||||
if (pSW){
|
||||
setResSchemaInfo(&pRspObj->resInfo, pSW->pSchema, pSW->nCols);
|
||||
TAOS_CHECK_RETURN(setResSchemaInfo(&pRspObj->resInfo, pSW->pSchema, pSW->nCols));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -493,7 +493,7 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_tmq_TMQConnector_fetchRawBlockImp(
|
|||
(*env)->SetIntField(env, metadataObj, g_metadataColindexField, i);
|
||||
jstring metadataObjColname = (*env)->NewStringUTF(env, fields[i].name);
|
||||
(*env)->SetObjectField(env, metadataObj, g_metadataColnameField, metadataObjColname);
|
||||
(*env)->CallBooleanMethod(env, arrayListObj, g_arrayListAddFp, metadataObj);
|
||||
(void)(*env)->CallBooleanMethod(env, arrayListObj, g_arrayListAddFp, metadataObj);
|
||||
}
|
||||
|
||||
(*env)->CallVoidMethod(env, rowobj, g_blockdataSetNumOfRowsFp, (jint)numOfRows);
|
||||
|
@ -567,7 +567,7 @@ JNIEXPORT jint JNICALL Java_com_taosdata_jdbc_tmq_TMQConnector_tmqGetTopicAssign
|
|||
(*env)->CallVoidMethod(env, jassignment, g_assignmentSetCurrentOffset, assignment.currentOffset);
|
||||
(*env)->CallVoidMethod(env, jassignment, g_assignmentSetBegin, assignment.begin);
|
||||
(*env)->CallVoidMethod(env, jassignment, g_assignmentSetEnd, assignment.end);
|
||||
(*env)->CallBooleanMethod(env, jarrayList, g_arrayListAddFp, jassignment);
|
||||
(void)(*env)->CallBooleanMethod(env, jarrayList, g_arrayListAddFp, jassignment);
|
||||
}
|
||||
tmq_free_assignment(pAssign);
|
||||
return JNI_SUCCESS;
|
||||
|
|
Loading…
Reference in New Issue