Merge pull request #27413 from taosdata/fix/3.0/TD-31524-TD-31523

fix error not reported in sort operator
This commit is contained in:
dapan1121 2024-08-24 15:00:50 +08:00 committed by GitHub
commit bf9e5f349d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -973,6 +973,9 @@ int32_t blockDataToBuf(char* buf, const SSDataBlock* pBlock) {
int32_t blockDataFromBuf(SSDataBlock* pBlock, const char* buf) {
int32_t numOfRows = *(int32_t*)buf;
if (numOfRows == 0) {
return TSDB_CODE_QRY_EXECUTOR_INTERNAL_ERROR;
}
int32_t code = blockDataEnsureCapacity(pBlock, numOfRows);
if (code) {
return code;

View File

@ -295,6 +295,9 @@ static int32_t getSortedBlockData(SSortHandle* pHandle, SSDataBlock* pDataBlock,
break;
}
}
if (TSDB_CODE_SUCCESS != code) {
return code;
}
if (p->info.rows > 0) {
code = blockDataEnsureCapacity(pDataBlock, capacity);