From b97f9bfcad479782db892f211a9776414722efde Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Tue, 26 Jul 2022 09:48:43 +0800 Subject: [PATCH] fix: fix load_table_info error --- source/client/src/clientImpl.c | 2 +- source/client/src/clientMain.c | 2 +- source/libs/executor/src/dataDeleter.c | 5 ++++- source/libs/executor/src/executor.c | 1 + source/libs/qworker/src/qworker.c | 2 ++ 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index 03238e6747..eecb22abe5 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -2019,7 +2019,7 @@ int32_t transferTableNameList(const char* tbList, int32_t acctId, char* dbName, } if (('a' <= *(tbList + i) && 'z' >= *(tbList + i)) || ('A' <= *(tbList + i) && 'Z' >= *(tbList + i)) || - ('0' <= *(tbList + i) && '9' >= *(tbList + i))) { + ('0' <= *(tbList + i) && '9' >= *(tbList + i)) || ('_' == *(tbList + i))) { if (vLen[vIdx] > 0) { goto _return; } diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c index 77b31011a3..416d50d987 100644 --- a/source/client/src/clientMain.c +++ b/source/client/src/clientMain.c @@ -973,7 +973,7 @@ int taos_load_table_info(TAOS *taos, const char *tableNameList) { conn.mgmtEps = getEpSet_s(&pTscObj->pAppInfo->mgmtEp); - code = catalogAsyncGetAllMeta(pCtg, &conn, &catalogReq, syncCatalogFn, NULL, NULL); + code = catalogAsyncGetAllMeta(pCtg, &conn, &catalogReq, syncCatalogFn, pRequest->body.param, NULL); if (code) { goto _return; } diff --git a/source/libs/executor/src/dataDeleter.c b/source/libs/executor/src/dataDeleter.c index 3c56abbd15..a0d4d64bff 100644 --- a/source/libs/executor/src/dataDeleter.c +++ b/source/libs/executor/src/dataDeleter.c @@ -182,7 +182,8 @@ static int32_t getDataBlock(SDataSinkHandle* pHandle, SOutputData* pOutput) { return TSDB_CODE_SUCCESS; } SDataCacheEntry* pEntry = (SDataCacheEntry*)(pDeleter->nextOutput.pData); - memcpy(pOutput->pData, pEntry->data, pEntry->dataLen); + memcpy(pOutput->pData, pEntry->data, pEntry->dataLen); + pDeleter->pParam->pUidList = NULL; pOutput->numOfRows = pEntry->numOfRows; pOutput->numOfCols = pEntry->numOfCols; pOutput->compressed = pEntry->compressed; @@ -205,6 +206,8 @@ static int32_t destroyDataSinker(SDataSinkHandle* pHandle) { SDataDeleterHandle* pDeleter = (SDataDeleterHandle*)pHandle; atomic_sub_fetch_64(&gDataSinkStat.cachedSize, pDeleter->cachedSize); taosMemoryFreeClear(pDeleter->nextOutput.pData); + taosArrayDestroy(pDeleter->pParam->pUidList); + taosMemoryFree(pDeleter->pParam); while (!taosQueueEmpty(pDeleter->pDataBlocks)) { SDataDeleterBuf* pBuf = NULL; taosReadQitem(pDeleter->pDataBlocks, (void**)&pBuf); diff --git a/source/libs/executor/src/executor.c b/source/libs/executor/src/executor.c index d8cd76d31e..f249321a76 100644 --- a/source/libs/executor/src/executor.c +++ b/source/libs/executor/src/executor.c @@ -416,6 +416,7 @@ int32_t qExecTask(qTaskInfo_t tinfo, SSDataBlock** pRes, uint64_t* useconds) { } if (isTaskKilled(pTaskInfo)) { + atomic_store_64(&pTaskInfo->owner, 0); qDebug("%s already killed, abort", GET_TASKID(pTaskInfo)); return TSDB_CODE_SUCCESS; } diff --git a/source/libs/qworker/src/qworker.c b/source/libs/qworker/src/qworker.c index d77e42388b..e09887e651 100644 --- a/source/libs/qworker/src/qworker.c +++ b/source/libs/qworker/src/qworker.c @@ -283,6 +283,8 @@ int32_t qwGetDeleteResFromSink(QW_FPARAMS_DEF, SQWTaskCtx *ctx, SDeleteRes *pRes pRes->skey = pDelRes->skey; pRes->ekey = pDelRes->ekey; pRes->affectedRows = pDelRes->affectedRows; + + taosMemoryFree(output.pData); return TSDB_CODE_SUCCESS; } -- GitLab