diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index 485471fc9e52f17491183373a80f87b43188a6c9..6da08e8e3ced82c665e8174f8e4a871e5633eb7e 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -5711,6 +5711,7 @@ void addToDiskbasedBuf(SOrderOperatorInfo* pInfo, jmp_buf env) { assert(size <= getBufPageSize(pInfo->pSortInternalBuf)); blockDataToBuf(pPage->data, p); + releaseResBufPage(pInfo->pSortInternalBuf, pPage); blockDataDestroy(p); start = stop + 1; diff --git a/source/libs/executor/test/executorTests.cpp b/source/libs/executor/test/executorTests.cpp index c8db23c429a23996d212923eadef1e3c71ee4368..136b195ecc87e8e121e78b10f7de6e954ca7d8a3 100644 --- a/source/libs/executor/test/executorTests.cpp +++ b/source/libs/executor/test/executorTests.cpp @@ -262,7 +262,7 @@ TEST(testCase, external_sort_Test) { int32_t total = 1; -// while(1) { + while(1) { int64_t s = taosGetTimestampUs(); pRes = pOperator->exec(pOperator, &newgroup); @@ -270,16 +270,16 @@ TEST(testCase, external_sort_Test) { printf("---------------elapsed:%ld\n", e - s); if (pRes == NULL) { -// break; + break; } - SColumnInfoData* pCol1 = static_cast(taosArrayGet(pRes->pDataBlock, 0)); - SColumnInfoData* pCol2 = static_cast(taosArrayGet(pRes->pDataBlock, 1)); - for (int32_t i = 0; i < pRes->info.rows; ++i) { - char* p = colDataGet(pCol2, i); +// SColumnInfoData* pCol1 = static_cast(taosArrayGet(pRes->pDataBlock, 0)); +// SColumnInfoData* pCol2 = static_cast(taosArrayGet(pRes->pDataBlock, 1)); +// for (int32_t i = 0; i < pRes->info.rows; ++i) { +// char* p = colDataGet(pCol2, i); // printf("%d: %d, %s\n", total++, ((int32_t*)pCol1->pData)[i], (char*)varDataVal(p)); - } -// } +// } + } pOperator->cleanupFn(pOperator->info, 2); tfree(exp);