提交 2e5cc3f2 编写于 作者: wmmhello's avatar wmmhello

change taosArrayDestroy(*)->taosArrayDestroy(**)

上级 3dd18dde
......@@ -1296,10 +1296,10 @@ int tscSmlInsert(TAOS* taos, TAOS_SML_DATA_POINT* points, int numPoint, SSmlLine
clean_up:
for (int i = 0; i < taosArrayGetSize(stableSchemas); ++i) {
SSmlSTableSchema* schema = taosArrayGet(stableSchemas, i);
taosArrayDestroy(schema->fields);
taosArrayDestroy(schema->tags);
taosArrayDestroy(&schema->fields);
taosArrayDestroy(&schema->tags);
}
taosArrayDestroy(stableSchemas);
taosArrayDestroy(&stableSchemas);
return code;
}
......@@ -2496,7 +2496,7 @@ cleanup:
destroySmlDataPoint(points+i);
}
taosArrayDestroy(lpPoints);
taosArrayDestroy(&lpPoints);
tfree(info);
return code;
......
......@@ -1106,7 +1106,7 @@ cleanup:
destroySmlDataPoint(points+i);
}
taosArrayDestroy(lpPoints);
taosArrayDestroy(&lpPoints);
tfree(info);
return code;
......
......@@ -1924,7 +1924,7 @@ int taos_stmt_close(TAOS_STMT* stmt) {
pStmt->pSql->cmd.insertParam.pTableBlockHashList = NULL;
}
taosArrayDestroy(pStmt->mtb.tags);
taosArrayDestroy(&pStmt->mtb.tags);
tfree(pStmt->mtb.sqlstr);
}
}
......
......@@ -1835,7 +1835,7 @@ static int32_t handleScalarTypeExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32
int32_t ret = exprTreeFromSqlExpr(pCmd, &pNode, pItem->pNode, pQueryInfo, colList, NULL);
if (ret != TSDB_CODE_SUCCESS) {
taosArrayDestroy(colList);
taosArrayDestroy(&colList);
tExprTreeDestroy(pNode, NULL);
if (tscGetErrorMsgLength(pCmd) > 0) {
return ret;
......@@ -1850,7 +1850,7 @@ static int32_t handleScalarTypeExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32
SColIndex* pIndex = taosArrayGet(colList, k);
if (TSDB_COL_IS_TAG(pIndex->flag)) {
tExprTreeDestroy(pNode, NULL);
taosArrayDestroy(colList);
taosArrayDestroy(&colList);
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg3);
}
......@@ -1858,7 +1858,7 @@ static int32_t handleScalarTypeExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32
ret = exprTreeValidateTree(tscGetErrorMsgPayload(pCmd), pNode);
if (ret != TSDB_CODE_SUCCESS) {
taosArrayDestroy(colList);
taosArrayDestroy(&colList);
tExprTreeDestroy(pNode, NULL);
if (tscGetErrorMsgLength(pCmd) > 0) {
return ret;
......@@ -1899,7 +1899,7 @@ static int32_t handleScalarTypeExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32
tscInsertPrimaryTsSourceColumn(pQueryInfo, pExpr->base.uid);
tbufCloseWriter(&bw);
taosArrayDestroy(colList);
taosArrayDestroy(&colList);
tExprTreeDestroy(pNode, NULL);
return TSDB_CODE_SUCCESS;
......@@ -4290,7 +4290,7 @@ static int32_t getColQueryCondExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, tSqlEx
SArray* colList = taosArrayInit(10, sizeof(SColIndex));
ret = exprTreeFromSqlExpr(pCmd, &p, p1, pQueryInfo, colList, NULL);
taosArrayDestroy(colList);
taosArrayDestroy(&colList);
SBufferWriter bw = tbufInitWriter(NULL, false);
......@@ -5727,7 +5727,7 @@ static int32_t getTagQueryCondExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SCondE
tSqlExprDestroy(p1);
tExprTreeDestroy(p, NULL); //TODO
taosArrayDestroy(colList);
taosArrayDestroy(&colList);
if (pQueryInfo->tagCond.pCond != NULL && taosArrayGetSize(pQueryInfo->tagCond.pCond) > 0 && !UTIL_TABLE_IS_SUPER_TABLE(pTableMetaInfo)) {
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), "filter on tag not supported for normal table");
}
......@@ -5849,7 +5849,7 @@ static int32_t getQueryTimeRange(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, tSqlExpr
SArray* colList = taosArrayInit(10, sizeof(SColIndex));
ret = exprTreeFromSqlExpr(pCmd, &p, *pExpr, pQueryInfo, colList, NULL);
taosArrayDestroy(colList);
taosArrayDestroy(&colList);
if (ret != TSDB_CODE_SUCCESS) {
goto _ret;
......@@ -9461,15 +9461,15 @@ int32_t loadAllTableMeta(SSqlObj* pSql, struct SSqlInfo* pInfo) {
_end:
if (plist != NULL) {
taosArrayDestroyEx(plist, freeElem);
taosArrayDestroyEx(&plist, freeElem);
}
if (pVgroupList != NULL) {
taosArrayDestroyEx(pVgroupList, freeElem);
taosArrayDestroyEx(&pVgroupList, freeElem);
}
if (tableNameList != NULL) {
taosArrayDestroy(tableNameList);
taosArrayDestroy(&tableNameList);
}
tfree(pTableMeta);
......
......@@ -1006,7 +1006,7 @@ int taos_load_table_info(TAOS *taos, const char *tableNameList) {
SArray* vgroupList = taosArrayInit(4, POINTER_BYTES);
if (vgroupList == NULL) {
taosArrayDestroy(plist);
taosArrayDestroy(&plist);
tfree(str);
return TSDB_CODE_TSC_OUT_OF_MEMORY;
}
......@@ -1023,8 +1023,8 @@ int taos_load_table_info(TAOS *taos, const char *tableNameList) {
if (code != TSDB_CODE_SUCCESS) {
tscFreeSqlObj(pSql);
taosArrayDestroyEx(plist, freeElem);
taosArrayDestroyEx(vgroupList, freeElem);
taosArrayDestroyEx(&plist, freeElem);
taosArrayDestroyEx(&vgroupList, freeElem);
return code;
}
......@@ -1037,8 +1037,8 @@ int taos_load_table_info(TAOS *taos, const char *tableNameList) {
code = TSDB_CODE_SUCCESS;
}
taosArrayDestroyEx(plist, freeElem);
taosArrayDestroyEx(vgroupList, freeElem);
taosArrayDestroyEx(&plist, freeElem);
taosArrayDestroyEx(&vgroupList, freeElem);
if (code != TSDB_CODE_SUCCESS) {
tscFreeRegisteredSqlObj(pSql);
......
......@@ -3903,7 +3903,7 @@ void* createQInfoFromQueryNode(SQueryInfo* pQueryInfo, STableGroupInfo* pTableGr
STsBufInfo bufInfo = {0};
SQueryParam param = {.pOperator = pa};
/*int32_t code = */initQInfo(&bufInfo, NULL, pSourceOperator, pQInfo, &param, NULL, 0, merger);
taosArrayDestroy(pa);
taosArrayDestroy(&pa);
return pQInfo;
......
......@@ -2675,7 +2675,7 @@ void tscExprDestroy(SArray* pExprInfo) {
sqlExprDestroy(pExpr);
}
taosArrayDestroy(pExprInfo);
taosArrayDestroy(&pExprInfo);
}
int32_t tscExprCopy(SArray* dst, const SArray* src, uint64_t uid, bool deepcopy) {
......@@ -2883,7 +2883,7 @@ void tscColumnListDestroy(SArray* pColumnList) {
tscColumnDestroy(pCol);
}
taosArrayDestroy(pColumnList);
taosArrayDestroy(&pColumnList);
}
/*
......@@ -3260,7 +3260,7 @@ void tscColCondRelease(SArray** pCond) {
tfree(p->cond);
}
taosArrayDestroy(*pCond);
taosArrayDestroy(pCond);
*pCond = NULL;
}
......@@ -3274,7 +3274,7 @@ void tscTagCondRelease(STagCond* pTagCond) {
tfree(p->cond);
}
taosArrayDestroy(pTagCond->pCond);
taosArrayDestroy(&pTagCond->pCond);
}
for (int32_t i = 0; i < TSDB_MAX_JOIN_TABLE_NUM; ++i) {
......@@ -3284,11 +3284,11 @@ void tscTagCondRelease(STagCond* pTagCond) {
}
if (node->tsJoin != NULL) {
taosArrayDestroy(node->tsJoin);
taosArrayDestroy(&node->tsJoin);
}
if (node->tagJoin != NULL) {
taosArrayDestroy(node->tagJoin);
taosArrayDestroy(&node->tagJoin);
}
tfree(node);
......@@ -3471,7 +3471,7 @@ static void freeQueryInfoImpl(SQueryInfo* pQueryInfo) {
pQueryInfo->colList = NULL;
if (pQueryInfo->groupbyExpr.columnInfo != NULL) {
taosArrayDestroy(pQueryInfo->groupbyExpr.columnInfo);
taosArrayDestroy(&pQueryInfo->groupbyExpr.columnInfo);
pQueryInfo->groupbyExpr.columnInfo = NULL;
pQueryInfo->groupbyExpr.numOfGroupCols = 0;
}
......@@ -3483,7 +3483,7 @@ static void freeQueryInfoImpl(SQueryInfo* pQueryInfo) {
pQueryInfo->fillType = 0;
tfree(pQueryInfo->buf);
taosArrayDestroy(pQueryInfo->pUpstream);
taosArrayDestroy(&pQueryInfo->pUpstream);
pQueryInfo->pUpstream = NULL;
pQueryInfo->bufLen = 0;
}
......@@ -3618,10 +3618,10 @@ void tscFreeVgroupTableInfo(SArray* pVgroupTables) {
tfree(pInfo->vgInfo.epAddr[j].fqdn);
}
#endif
taosArrayDestroy(pInfo->itemList);
taosArrayDestroy(&pInfo->itemList);
}
taosArrayDestroy(pVgroupTables);
taosArrayDestroy(&pVgroupTables);
}
void tscRemoveVgroupTableGroup(SArray* pVgroupTable, int32_t index) {
......@@ -3635,7 +3635,7 @@ void tscRemoveVgroupTableGroup(SArray* pVgroupTable, int32_t index) {
// tfree(pInfo->vgInfo.epAddr[j].fqdn);
// }
taosArrayDestroy(pInfo->itemList);
taosArrayDestroy(&pInfo->itemList);
taosArrayRemove(pVgroupTable, index);
}
......
......@@ -66,7 +66,7 @@ typedef struct SDiskbasedResultBuf {
SHashObj* groupSet; // id hash table
SHashObj* all;
SList* lruList;
void* emptyDummyIdList; // dummy id list
SArray * emptyDummyIdList; // dummy id list
void* assistBuf; // assistant buffer for compress/decompress data
SArray* pFree; // free area in file
bool comp; // compressed before flushed to disk
......
......@@ -4319,7 +4319,7 @@ void block_func_merge(SQLFunctionCtx* pCtx) {
blockDistInfoFromBinary(((char*)pCtx->pInput) + sizeof(int32_t), len, &info);
SResultRowCellInfo *pResInfo = GET_RES_INFO(pCtx);
mergeTableBlockDist(pResInfo, &info);
taosArrayDestroy(info.dataBlockInfos);
taosArrayDestroy(&info.dataBlockInfos);
pResInfo->numOfRes = 1;
pResInfo->hasResult = DATA_SET_FLAG;
......@@ -4427,7 +4427,7 @@ void blockinfo_func_finalizer(SQLFunctionCtx* pCtx) {
generateBlockDistResult(pDist, pCtx->pOutput);
if (pDist->dataBlockInfos != NULL) {
taosArrayDestroy(pDist->dataBlockInfos);
taosArrayDestroy(&pDist->dataBlockInfos);
pDist->dataBlockInfos = NULL;
}
......
......@@ -2304,8 +2304,8 @@ static void teardownQueryRuntimeEnv(SQueryRuntimeEnv *pRuntimeEnv) {
destroyOperatorInfo(pRuntimeEnv->proot);
pRuntimeEnv->pool = destroyResultRowPool(pRuntimeEnv->pool);
taosArrayDestroy(pRuntimeEnv->pResultRowArrayList);
taosArrayDestroyEx(pRuntimeEnv->prevResult, freeInterResult);
taosArrayDestroy(&pRuntimeEnv->pResultRowArrayList);
taosArrayDestroyEx(&pRuntimeEnv->prevResult, freeInterResult);
pRuntimeEnv->prevResult = NULL;
}
......@@ -4414,7 +4414,7 @@ void calculateOperatorProfResults(SQInfo* pQInfo) {
}
}
taosArrayDestroy(opStack);
taosArrayDestroy(&opStack);
}
void queryCostStatis(SQInfo *pQInfo) {
......@@ -5370,14 +5370,14 @@ static void destroyGlobalAggOperatorInfo(void* param, int32_t numOfOutput) {
SMultiwayMergeInfo *pInfo = (SMultiwayMergeInfo*) param;
destroyBasicOperatorInfo(&pInfo->binfo, numOfOutput);
taosArrayDestroy(pInfo->orderColumnList);
taosArrayDestroy(pInfo->groupColumnList);
taosArrayDestroy(&pInfo->orderColumnList);
taosArrayDestroy(&pInfo->groupColumnList);
tfree(pInfo->prevRow);
tfree(pInfo->currentGroupColData);
}
static void destroySlimitOperatorInfo(void* param, int32_t numOfOutput) {
SSLimitOperatorInfo *pInfo = (SSLimitOperatorInfo*) param;
taosArrayDestroy(pInfo->orderColumnList);
taosArrayDestroy(&pInfo->orderColumnList);
pInfo->pRes = destroyOutputBuf(pInfo->pRes);
tfree(pInfo->prevRow);
}
......@@ -7035,7 +7035,7 @@ static void destroyDistinctOperatorInfo(void* param, int32_t numOfOutput) {
SDistinctOperatorInfo* pInfo = (SDistinctOperatorInfo*) param;
taosHashCleanup(pInfo->pSet);
tfree(pInfo->buf);
taosArrayDestroy(pInfo->pDistinctDataInfo);
taosArrayDestroy(&pInfo->pDistinctDataInfo);
pInfo->pRes = destroyOutputBuf(pInfo->pRes);
}
......@@ -9036,7 +9036,7 @@ _cleanup_qinfo:
tsdbDestroyTableGroup(pTableGroupInfo);
if (pGroupbyExpr != NULL) {
taosArrayDestroy(pGroupbyExpr->columnInfo);
taosArrayDestroy(&pGroupbyExpr->columnInfo);
free(pGroupbyExpr);
}
......@@ -9168,11 +9168,11 @@ static void doDestroyTableQueryInfo(STableGroupInfo* pTableqinfoGroupInfo) {
destroyTableQueryInfoImpl(item);
}
taosArrayDestroy(p);
taosArrayDestroy(&p);
}
}
taosArrayDestroy(pTableqinfoGroupInfo->pGroupList);
taosArrayDestroy(&pTableqinfoGroupInfo->pGroupList);
taosHashCleanup(pTableqinfoGroupInfo->map);
pTableqinfoGroupInfo->pGroupList = NULL;
......@@ -9239,10 +9239,10 @@ void freeQInfo(SQInfo *pQInfo) {
tfree(pQInfo->pBuf);
tfree(pQInfo->sql);
taosArrayDestroy(pQInfo->summary.queryProfEvents);
taosArrayDestroy(&pQInfo->summary.queryProfEvents);
taosHashCleanup(pQInfo->summary.operatorProfResults);
taosArrayDestroy(pRuntimeEnv->groupResInfo.pRows);
taosArrayDestroy(&pRuntimeEnv->groupResInfo.pRows);
pQInfo->signature = 0;
qDebug("QInfo:0x%"PRIx64" QInfo is freed", pQInfo->qId);
......@@ -9433,7 +9433,7 @@ void freeQueryAttr(SQueryAttr* pQueryAttr) {
pQueryAttr->tableCols = freeColumnInfo(pQueryAttr->tableCols, pQueryAttr->numOfCols);
if (pQueryAttr->pGroupbyExpr != NULL) {
taosArrayDestroy(pQueryAttr->pGroupbyExpr->columnInfo);
taosArrayDestroy(&pQueryAttr->pGroupbyExpr->columnInfo);
tfree(pQueryAttr->pGroupbyExpr);
}
......
......@@ -1512,8 +1512,8 @@ int32_t filterTreeToGroup(tExprNode* tree, SFilterInfo *info, SArray* group) {
ERR_JRET(filterDetachCnfGroups(group, leftGroup, rightGroup));
taosArrayDestroyEx(leftGroup, filterFreeGroup);
taosArrayDestroyEx(rightGroup, filterFreeGroup);
taosArrayDestroyEx(&leftGroup, filterFreeGroup);
taosArrayDestroyEx(&rightGroup, filterFreeGroup);
return TSDB_CODE_SUCCESS;
}
......@@ -1530,8 +1530,8 @@ int32_t filterTreeToGroup(tExprNode* tree, SFilterInfo *info, SArray* group) {
_return:
taosArrayDestroyEx(leftGroup, filterFreeGroup);
taosArrayDestroyEx(rightGroup, filterFreeGroup);
taosArrayDestroyEx(&leftGroup, filterFreeGroup);
taosArrayDestroyEx(&rightGroup, filterFreeGroup);
return code;
}
......@@ -1696,7 +1696,7 @@ void filterFreeColInfo(void *data) {
} else if (info->type == RANGE_TYPE_MR_CTX) {
filterFreeRangeCtx(info->info);
} else if (info->type == RANGE_TYPE_UNIT) {
taosArrayDestroy((SArray *)info->info);
taosArrayDestroy((SArray**)&info->info);
}
//NO NEED TO FREE UNIT
......@@ -2067,7 +2067,7 @@ int32_t filterMergeUnits(SFilterInfo *info, SFilterGroupCtx* gRes, uint32_t colI
}
}
taosArrayDestroy(colArray);
taosArrayDestroy(&colArray);
FILTER_PUSH_CTX(gRes->colInfo[colIdx], ctx);
......@@ -2325,7 +2325,7 @@ int32_t filterMergeTwoGroups(SFilterInfo *info, SFilterGroupCtx** gRes1, SFilter
FILTER_PUSH_CTX((*gRes1)->colInfo[pctx->colIdx], pctx->ctx);
}
taosArrayDestroy(colCtxs);
taosArrayDestroy(&colCtxs);
return TSDB_CODE_SUCCESS;
......@@ -2333,9 +2333,9 @@ _return:
if (colCtxs) {
if (taosArrayGetSize(colCtxs) > 0) {
taosArrayDestroyEx(colCtxs, filterFreeColCtx);
taosArrayDestroyEx(&colCtxs, filterFreeColCtx);
} else {
taosArrayDestroy(colCtxs);
taosArrayDestroy(&colCtxs);
}
}
......@@ -2511,7 +2511,7 @@ int32_t filterRewrite(SFilterInfo *info, SFilterGroupCtx** gRes, int32_t gResNum
filterConvertGroupFromArray(info, group);
taosArrayDestroy(group);
taosArrayDestroy(&group);
filterFreeInfo(&oinfo);
......@@ -3349,7 +3349,7 @@ int32_t filterInitFromTree(tExprNode* tree, void **pinfo, uint32_t options) {
ERR_JRET(code);
filterConvertGroupFromArray(info, group);
taosArrayDestroy(group);
taosArrayDestroy(&group);
ERR_JRET(filterInitValFieldData(info));
......
......@@ -944,8 +944,8 @@ static void freeCommonItem(void *pItem) {
void freeCreateTableInfo(void* p) {
SCreatedTableInfo* pInfo = (SCreatedTableInfo*) p;
taosArrayDestroy(pInfo->pTagNames);
taosArrayDestroyEx(pInfo->pTagVals, freeVariant);
taosArrayDestroy(&pInfo->pTagNames);
taosArrayDestroyEx(&pInfo->pTagVals, freeVariant);
tfree(pInfo->fullname);
tfree(pInfo->tagdata.data);
}
......@@ -961,15 +961,15 @@ void destroySqlNode(SSqlNode *pSqlNode) {
tSqlExprDestroy(pSqlNode->pWhere);
pSqlNode->pWhere = NULL;
taosArrayDestroyEx(pSqlNode->pSortOrder, freeCommonItem);
taosArrayDestroyEx(&pSqlNode->pSortOrder, freeCommonItem);
pSqlNode->pSortOrder = NULL;
taosArrayDestroyEx(pSqlNode->pGroupby, freeCommonItem);
taosArrayDestroyEx(&pSqlNode->pGroupby, freeCommonItem);
pSqlNode->pGroupby = NULL;
pSqlNode->from = destroyRelationInfo(pSqlNode->from);
taosArrayDestroyEx(pSqlNode->fillType, freeVariant);
taosArrayDestroyEx(&pSqlNode->fillType, freeVariant);
pSqlNode->fillType = NULL;
tSqlExprDestroy(pSqlNode->pHaving);
......@@ -987,7 +987,7 @@ void destroyAllSqlNode(SArray *pList) {
destroySqlNode(pNode);
}
taosArrayDestroy(pList);
taosArrayDestroy(&pList);
}
SCreateTableSql *tSetCreateTableInfo(SArray *pCols, SArray *pTags, SSqlNode *pSelect, int32_t type) {
......@@ -1060,10 +1060,10 @@ SAlterTableInfo *tSetAlterTableInfo(SStrToken *pTableName, SArray *pCols, SArray
void* destroyCreateTableSql(SCreateTableSql* pCreate) {
destroySqlNode(pCreate->pSelect);
taosArrayDestroy(pCreate->colInfo.pColumns);
taosArrayDestroy(pCreate->colInfo.pTagColumns);
taosArrayDestroy(&pCreate->colInfo.pColumns);
taosArrayDestroy(&pCreate->colInfo.pTagColumns);
taosArrayDestroyEx(pCreate->childTableInfo, freeCreateTableInfo);
taosArrayDestroyEx(&pCreate->childTableInfo, freeCreateTableInfo);
tfree(pCreate);
return NULL;
......@@ -1071,24 +1071,24 @@ void* destroyCreateTableSql(SCreateTableSql* pCreate) {
void SqlInfoDestroy(SSqlInfo *pInfo) {
if (pInfo == NULL) return;;
taosArrayDestroy(pInfo->funcs);
taosArrayDestroy(&pInfo->funcs);
if (pInfo->type == TSDB_SQL_SELECT) {
destroyAllSqlNode(pInfo->list);
} else if (pInfo->type == TSDB_SQL_CREATE_TABLE) {
pInfo->pCreateTableInfo = destroyCreateTableSql(pInfo->pCreateTableInfo);
} else if (pInfo->type == TSDB_SQL_ALTER_TABLE) {
taosArrayDestroyEx(pInfo->pAlterInfo->varList, freeVariant);
taosArrayDestroy(pInfo->pAlterInfo->pAddColumns);
taosArrayDestroyEx(&pInfo->pAlterInfo->varList, freeVariant);
taosArrayDestroy(&pInfo->pAlterInfo->pAddColumns);
tfree(pInfo->pAlterInfo);
} else if (pInfo->type == TSDB_SQL_COMPACT_VNODE) {
tSqlExprListDestroy(pInfo->list);
} else {
if (pInfo->pMiscInfo != NULL) {
taosArrayDestroy(pInfo->pMiscInfo->a);
taosArrayDestroy(&pInfo->pMiscInfo->a);
}
if (pInfo->pMiscInfo != NULL && (pInfo->type == TSDB_SQL_CREATE_DB || pInfo->type == TSDB_SQL_ALTER_DB)) {
taosArrayDestroyEx(pInfo->pMiscInfo->dbOpt.keep, freeVariant);
taosArrayDestroyEx(&pInfo->pMiscInfo->dbOpt.keep, freeVariant);
}
tfree(pInfo->pMiscInfo);
......
......@@ -316,8 +316,8 @@ static int tsdbCompactMeta(STsdbRepo *pRepo) {
static void tsdbDestroyCompactH(SCompactH *pComph) {
pComph->pDataCols = tdFreeDataCols(pComph->pDataCols);
pComph->aSupBlk = taosArrayDestroy(pComph->aSupBlk);
pComph->aBlkIdx = taosArrayDestroy(pComph->aBlkIdx);
pComph->aSupBlk = taosArrayDestroy(&pComph->aSupBlk);
pComph->aBlkIdx = taosArrayDestroy(&pComph->aBlkIdx);
tsdbDestroyCompTbArray(pComph);
tsdbDestroyReadH(&(pComph->readh));
tsdbCloseDFileSet(TSDB_COMPACT_WSET(pComph));
......@@ -370,7 +370,7 @@ static int tsdbCompactMeta(STsdbRepo *pRepo) {
tfree(pTh->pInfo);
}
pComph->tbArray = taosArrayDestroy(pComph->tbArray);
pComph->tbArray = taosArrayDestroy(&pComph->tbArray);
}
static int tsdbCacheFSetIndex(SCompactH *pComph) {
......
......@@ -1216,7 +1216,7 @@ static int tsdbRemoveTableFromIndex(STsdbMeta *pMeta, STable *pTable) {
}
}
taosArrayDestroy(res);
taosArrayDestroy(&res);
}
return 0;
}
......@@ -1680,7 +1680,7 @@ static void tsdbFreeTableSchema(STable *pTable) {
tdFreeSchema(pSchema);
}
taosArrayDestroy(pTable->schema);
taosArrayDestroy(&pTable->schema);
}
}
......@@ -3651,7 +3651,7 @@ SArray* createTableGroup(SArray* pTableList, STSchema* pTagSchema, SColIndex* pC
if (numOfOrderCols == 0 || size == 1) { // no group by tags clause or only one table
SArray* sa = taosArrayInit(size, sizeof(STableKeyInfo));
if (sa == NULL) {
taosArrayDestroy(pTableGroup);
taosArrayDestroy(&pTableGroup);
return NULL;
}
......@@ -3719,7 +3719,7 @@ int32_t tsdbQuerySTableByTagCond(STsdbRepo* tsdb, uint64_t uid, TSKEY skey, cons
tsdbDebug("%p no table name/tag condition, all tables qualified, numOfTables:%u, group:%zu", tsdb,
pGroupInfo->numOfTables, taosArrayGetSize(pGroupInfo->pGroupList));
taosArrayDestroy(res);
taosArrayDestroy(&res);
if (tsdbUnlockRepoMeta(tsdb) < 0) goto _error;
return ret;
}
......@@ -3768,14 +3768,14 @@ int32_t tsdbQuerySTableByTagCond(STsdbRepo* tsdb, uint64_t uid, TSKEY skey, cons
tsdbDebug("%p stable tid:%d, uid:%"PRIu64" query, numOfTables:%u, belong to %" PRIzu " groups", tsdb, pTable->tableId.tid,
pTable->tableId.uid, pGroupInfo->numOfTables, taosArrayGetSize(pGroupInfo->pGroupList));
taosArrayDestroy(res);
taosArrayDestroy(&res);
if (tsdbUnlockRepoMeta(tsdb) < 0) goto _error;
return ret;
_error:
taosArrayDestroy(res);
taosArrayDestroy(&res);
return terrno;
}
......@@ -3831,7 +3831,7 @@ int32_t tsdbGetTableGroupFromIdList(STsdbRepo* tsdb, SArray* pTableIdList, STabl
tsdbError("direct query on super tale is not allowed, table uid:%"PRIu64", tid:%d", id->uid, id->tid);
terrno = TSDB_CODE_QRY_INVALID_MSG;
tsdbUnlockRepoMeta(tsdb);
taosArrayDestroy(group);
taosArrayDestroy(&group);
return terrno;
}
......@@ -3842,7 +3842,7 @@ int32_t tsdbGetTableGroupFromIdList(STsdbRepo* tsdb, SArray* pTableIdList, STabl
}
if (tsdbUnlockRepoMeta(tsdb) < 0) {
taosArrayDestroy(group);
taosArrayDestroy(&group);
return terrno;
}
......@@ -3850,7 +3850,7 @@ int32_t tsdbGetTableGroupFromIdList(STsdbRepo* tsdb, SArray* pTableIdList, STabl
if (pGroupInfo->numOfTables > 0) {
taosArrayPush(pGroupInfo->pGroupList, &group);
} else {
taosArrayDestroy(group);
taosArrayDestroy(&group);
}
return TSDB_CODE_SUCCESS;
......@@ -3867,7 +3867,7 @@ static void* doFreeColumnInfoData(SArray* pColumnInfoData) {
tfree(pColInfo->pData);
}
taosArrayDestroy(pColumnInfoData);
taosArrayDestroy(&pColumnInfoData);
return NULL;
}
......@@ -3880,7 +3880,7 @@ static void* destroyTableCheckInfo(SArray* pTableCheckInfo) {
tfree(p->pCompInfo);
}
taosArrayDestroy(pTableCheckInfo);
taosArrayDestroy(&pTableCheckInfo);
return NULL;
}
......@@ -3892,7 +3892,7 @@ void tsdbCleanupQueryHandle(TsdbQueryHandleT queryHandle) {
pQueryHandle->pColumns = doFreeColumnInfoData(pQueryHandle->pColumns);
taosArrayDestroy(pQueryHandle->defaultLoadColumn);
taosArrayDestroy(&pQueryHandle->defaultLoadColumn);
tfree(pQueryHandle->pDataBlockInfo);
tfree(pQueryHandle->statis);
......@@ -3939,11 +3939,11 @@ void tsdbDestroyTableGroup(STableGroupInfo *pGroupList) {
//assert(pTable != NULL);
}
taosArrayDestroy(p);
taosArrayDestroy(&p);
}
taosHashCleanup(pGroupList->map);
taosArrayDestroy(pGroupList->pGroupList);
taosArrayDestroy(&pGroupList->pGroupList);
pGroupList->numOfTables = 0;
}
......@@ -4123,7 +4123,7 @@ static int32_t queryByJsonTag(STable* pTable, void* filterInfo, SArray* res){
}
}
tfree(addToResult);
taosArrayDestroy(tabList);
taosArrayDestroy(&tabList);
return TSDB_CODE_SUCCESS;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册