fix: check return value and fix bugs.
This commit is contained in:
parent
cd407950e7
commit
77097dc14f
|
@ -469,10 +469,10 @@ static int32_t doAddToBuf(SSDataBlock* pDataBlock, SSortHandle* pHandle) {
|
||||||
|
|
||||||
int32_t code = createDiskbasedBuf(&pHandle->pBuf, pHandle->pageSize, pHandle->numOfPages * pHandle->pageSize,
|
int32_t code = createDiskbasedBuf(&pHandle->pBuf, pHandle->pageSize, pHandle->numOfPages * pHandle->pageSize,
|
||||||
"sortExternalBuf", tsTempDir);
|
"sortExternalBuf", tsTempDir);
|
||||||
dBufSetPrintInfo(pHandle->pBuf);
|
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
dBufSetPrintInfo(pHandle->pBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
SArray* pPageIdList = taosArrayInit(4, sizeof(int32_t));
|
SArray* pPageIdList = taosArrayInit(4, sizeof(int32_t));
|
||||||
|
@ -562,10 +562,10 @@ static int32_t sortComparInit(SMsortComparParam* pParam, SArray* pSources, int32
|
||||||
|
|
||||||
code = createDiskbasedBuf(&pHandle->pBuf, pHandle->pageSize, pHandle->numOfPages * pHandle->pageSize,
|
code = createDiskbasedBuf(&pHandle->pBuf, pHandle->pageSize, pHandle->numOfPages * pHandle->pageSize,
|
||||||
"sortComparInit", tsTempDir);
|
"sortComparInit", tsTempDir);
|
||||||
dBufSetPrintInfo(pHandle->pBuf);
|
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
terrno = code;
|
|
||||||
return code;
|
return code;
|
||||||
|
} else {
|
||||||
|
dBufSetPrintInfo(pHandle->pBuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1111,9 +1111,10 @@ static int32_t createPageBuf(SSortHandle* pHandle) {
|
||||||
|
|
||||||
int32_t code = createDiskbasedBuf(&pHandle->pBuf, pHandle->pageSize, pHandle->numOfPages * pHandle->pageSize,
|
int32_t code = createDiskbasedBuf(&pHandle->pBuf, pHandle->pageSize, pHandle->numOfPages * pHandle->pageSize,
|
||||||
"tableBlocksBuf", tsTempDir);
|
"tableBlocksBuf", tsTempDir);
|
||||||
dBufSetPrintInfo(pHandle->pBuf);
|
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
return code;
|
return code;
|
||||||
|
} else {
|
||||||
|
dBufSetPrintInfo(pHandle->pBuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue