Merge pull request #21849 from taosdata/mark/scan
fix:coverity scan error
This commit is contained in:
commit
255c9be2d7
|
@ -749,6 +749,9 @@ static int32_t smlSendMetaMsg(SSmlHandle *info, SName *pName, SArray *pColumns,
|
||||||
pReq.suid = pTableMeta->uid;
|
pReq.suid = pTableMeta->uid;
|
||||||
pReq.source = TD_REQ_FROM_TAOX;
|
pReq.source = TD_REQ_FROM_TAOX;
|
||||||
pSql = (action == SCHEMA_ACTION_ADD_COLUMN) ? "sml_add_column" : "sml_modify_column_size";
|
pSql = (action == SCHEMA_ACTION_ADD_COLUMN) ? "sml_add_column" : "sml_modify_column_size";
|
||||||
|
} else{
|
||||||
|
uError("SML:0x%" PRIx64 " invalid action:%d", info->id, action);
|
||||||
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
code = buildRequest(info->taos->id, pSql, strlen(pSql), NULL, false, &pRequest, 0);
|
code = buildRequest(info->taos->id, pSql, strlen(pSql), NULL, false, &pRequest, 0);
|
||||||
|
|
|
@ -939,8 +939,6 @@ int stmtClose(TAOS_STMT* stmt) {
|
||||||
stmtCleanSQLInfo(pStmt);
|
stmtCleanSQLInfo(pStmt);
|
||||||
taosMemoryFree(stmt);
|
taosMemoryFree(stmt);
|
||||||
|
|
||||||
STMT_DLOG_E("stmt freed");
|
|
||||||
|
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -651,7 +651,7 @@ static void asyncCommitOffset(tmq_t* tmq, const TAOS_RES* pRes, int32_t type, tm
|
||||||
int32_t j = 0;
|
int32_t j = 0;
|
||||||
int32_t numOfVgroups = taosArrayGetSize(pTopic->vgs);
|
int32_t numOfVgroups = taosArrayGetSize(pTopic->vgs);
|
||||||
for (j = 0; j < numOfVgroups; j++) {
|
for (j = 0; j < numOfVgroups; j++) {
|
||||||
SMqClientVg* pVg = taosArrayGet(pTopic->vgs, j);
|
SMqClientVg* pVg = (SMqClientVg*)taosArrayGet(pTopic->vgs, j);
|
||||||
if (pVg->vgId == vgId) {
|
if (pVg->vgId == vgId) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -665,7 +665,7 @@ static void asyncCommitOffset(tmq_t* tmq, const TAOS_RES* pRes, int32_t type, tm
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SMqClientVg* pVg = taosArrayGet(pTopic->vgs, j);
|
SMqClientVg* pVg = (SMqClientVg*)taosArrayGet(pTopic->vgs, j);
|
||||||
if (pVg->offsetInfo.currentOffset.type > 0 && !tOffsetEqual(&pVg->offsetInfo.currentOffset, &pVg->offsetInfo.committedOffset)) {
|
if (pVg->offsetInfo.currentOffset.type > 0 && !tOffsetEqual(&pVg->offsetInfo.currentOffset, &pVg->offsetInfo.committedOffset)) {
|
||||||
code = doSendCommitMsg(tmq, pVg, pTopic->topicName, pParamSet, j, numOfVgroups, type);
|
code = doSendCommitMsg(tmq, pVg, pTopic->topicName, pParamSet, j, numOfVgroups, type);
|
||||||
|
|
||||||
|
@ -741,13 +741,15 @@ static void asyncCommitAllOffsets(tmq_t* tmq, tmq_commit_cb* pCommitFp, void* us
|
||||||
|
|
||||||
static void generateTimedTask(int64_t refId, int32_t type) {
|
static void generateTimedTask(int64_t refId, int32_t type) {
|
||||||
tmq_t* tmq = taosAcquireRef(tmqMgmt.rsetId, refId);
|
tmq_t* tmq = taosAcquireRef(tmqMgmt.rsetId, refId);
|
||||||
if (tmq != NULL) {
|
if(tmq == NULL) return;
|
||||||
|
|
||||||
int8_t* pTaskType = taosAllocateQitem(sizeof(int8_t), DEF_QITEM, 0);
|
int8_t* pTaskType = taosAllocateQitem(sizeof(int8_t), DEF_QITEM, 0);
|
||||||
|
if(pTaskType == NULL) return;
|
||||||
|
|
||||||
*pTaskType = type;
|
*pTaskType = type;
|
||||||
taosWriteQitem(tmq->delayedTask, pTaskType);
|
taosWriteQitem(tmq->delayedTask, pTaskType);
|
||||||
tsem_post(&tmq->rspSem);
|
tsem_post(&tmq->rspSem);
|
||||||
taosReleaseRef(tmqMgmt.rsetId, refId);
|
taosReleaseRef(tmqMgmt.rsetId, refId);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void tmqAssignAskEpTask(void* param, void* tmrId) {
|
void tmqAssignAskEpTask(void* param, void* tmrId) {
|
||||||
|
@ -762,19 +764,19 @@ void tmqAssignDelayedCommitTask(void* param, void* tmrId) {
|
||||||
taosMemoryFree(param);
|
taosMemoryFree(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
void tmqAssignDelayedReportTask(void* param, void* tmrId) {
|
//void tmqAssignDelayedReportTask(void* param, void* tmrId) {
|
||||||
int64_t refId = *(int64_t*)param;
|
// int64_t refId = *(int64_t*)param;
|
||||||
tmq_t* tmq = taosAcquireRef(tmqMgmt.rsetId, refId);
|
// tmq_t* tmq = taosAcquireRef(tmqMgmt.rsetId, refId);
|
||||||
if (tmq != NULL) {
|
// if (tmq != NULL) {
|
||||||
int8_t* pTaskType = taosAllocateQitem(sizeof(int8_t), DEF_QITEM, 0);
|
// int8_t* pTaskType = taosAllocateQitem(sizeof(int8_t), DEF_QITEM, 0);
|
||||||
*pTaskType = TMQ_DELAYED_TASK__REPORT;
|
// *pTaskType = TMQ_DELAYED_TASK__REPORT;
|
||||||
taosWriteQitem(tmq->delayedTask, pTaskType);
|
// taosWriteQitem(tmq->delayedTask, pTaskType);
|
||||||
tsem_post(&tmq->rspSem);
|
// tsem_post(&tmq->rspSem);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
taosReleaseRef(tmqMgmt.rsetId, refId);
|
// taosReleaseRef(tmqMgmt.rsetId, refId);
|
||||||
taosMemoryFree(param);
|
// taosMemoryFree(param);
|
||||||
}
|
//}
|
||||||
|
|
||||||
int32_t tmqHbCb(void* param, SDataBuf* pMsg, int32_t code) {
|
int32_t tmqHbCb(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
if (pMsg) {
|
if (pMsg) {
|
||||||
|
|
Loading…
Reference in New Issue