Merge pull request #19446 from taosdata/fix/TD-21728

fix: error code not returned issue
This commit is contained in:
dapan1121 2023-01-09 15:43:30 +08:00 committed by GitHub
commit 66f2cc2704
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -251,7 +251,8 @@ static int32_t sortComparInit(SMsortComparParam* pParam, SArray* pSources, int32
if (pHandle->pBuf == NULL) {
if (!osTempSpaceAvailable()) {
code = TSDB_CODE_NO_AVAIL_DISK;
qError("Sort compare init failed since %s, %s", terrstr(code), pHandle->idStr);
terrno = code;
qError("Sort compare init failed since %s, %s", tstrerror(code), pHandle->idStr);
return code;
}
@ -259,6 +260,7 @@ static int32_t sortComparInit(SMsortComparParam* pParam, SArray* pSources, int32
"sortComparInit", tsTempDir);
dBufSetPrintInfo(pHandle->pBuf);
if (code != TSDB_CODE_SUCCESS) {
terrno = code;
return code;
}
}
@ -282,6 +284,7 @@ static int32_t sortComparInit(SMsortComparParam* pParam, SArray* pSources, int32
code = blockDataFromBuf(pSource->src.pBlock, pPage);
if (code != TSDB_CODE_SUCCESS) {
terrno = code;
return code;
}