fix: memory error when limit 0

This commit is contained in:
slzhou 2024-01-23 17:05:03 +08:00
parent 5c9edce538
commit 70f869ce33
1 changed files with 1 additions and 1 deletions

View File

@ -1100,7 +1100,7 @@ static int32_t createBlocksMergeSortInitialSources(SSortHandle* pHandle) {
int64_t p = taosGetTimestampUs();
bool bExtractedBlock = false;
if (pBlk != NULL && pHandle->mergeLimit != -1) {
if (pBlk != NULL && pHandle->mergeLimit > 0) {
pBlk = getRowsBlockWithinMergeLimit(pHandle, mTableNumRows, pBlk, &bExtractedBlock);
}