fix: add mem check

This commit is contained in:
kailixu 2023-03-18 12:50:37 +08:00
parent f3b4dbd2b5
commit 45a625f2dc
1 changed files with 8 additions and 0 deletions

View File

@ -521,6 +521,14 @@ static SSDataBlock* sysTableScanUserCols(SOperatorInfo* pOperator) {
taosHashSetFreeFp(pInfo->pSchema, tDeleteSSchemaWrapperForHash);
}
if (!pInfo->pCur || !pInfo->pSchema) {
terrno = TSDB_CODE_OUT_OF_MEMORY;
qError("sysTableScanUserCols failed since %s", terrstr(terrno));
blockDataDestroy(dataBlock);
pInfo->loadInfo.totalRows = 0;
return NULL;
}
int32_t resume = pInfo->resume;
pInfo->resume = false;
while (resume || ((ret = metaTbCursorNext(pInfo->pCur, TSDB_TABLE_MAX)) == 0)) {