From ab47de1dae88097fc546a4e57f5dbe81a4e11b80 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 16 Jun 2022 18:30:22 +0800 Subject: [PATCH 1/5] fix(query): adjust group limitation. --- source/libs/executor/src/executorimpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/executor/src/executorimpl.c b/source/libs/executor/src/executorimpl.c index fb79c53384..66849e49b8 100644 --- a/source/libs/executor/src/executorimpl.c +++ b/source/libs/executor/src/executorimpl.c @@ -3508,7 +3508,7 @@ static int32_t handleLimitOffset(SOperatorInfo* pOperator, SSDataBlock* pBlock) if (pProjectInfo->limit.limit > 0 && pProjectInfo->curOutput + pRes->info.rows >= pProjectInfo->limit.limit) { pRes->info.rows = (int32_t)(pProjectInfo->limit.limit - pProjectInfo->curOutput); - if (pProjectInfo->slimit.limit == -1 || pProjectInfo->slimit.limit <= pProjectInfo->curGroupOutput) { + if (pProjectInfo->slimit.limit != -1 && pProjectInfo->slimit.limit <= pProjectInfo->curGroupOutput) { pOperator->status = OP_EXEC_DONE; } From c1de4df95bde0ec91dd59203d6403042fad52f20 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Thu, 16 Jun 2022 18:33:45 +0800 Subject: [PATCH 2/5] fix: fix page capacity calculation --- source/libs/tdb/src/db/tdbPage.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/libs/tdb/src/db/tdbPage.c b/source/libs/tdb/src/db/tdbPage.c index 92272fb438..78470b6256 100644 --- a/source/libs/tdb/src/db/tdbPage.c +++ b/source/libs/tdb/src/db/tdbPage.c @@ -246,14 +246,17 @@ void tdbPageCopy(SPage *pFromPage, SPage *pToPage) { int tdbPageCapacity(int pageSize, int amHdrSize) { int szPageHdr; + int minCellIndexSize; // at least one cell in cell index if (pageSize < 65536) { szPageHdr = pageMethods.szPageHdr; + minCellIndexSize = pageMethods.szOffset; } else { szPageHdr = pageLargeMethods.szPageHdr; + minCellIndexSize = pageLargeMethods.szOffset; } - return pageSize - szPageHdr - amHdrSize; + return pageSize - szPageHdr - amHdrSize - sizeof(SPageFtr) - minCellIndexSize; } static int tdbPageAllocate(SPage *pPage, int szCell, SCell **ppCell) { @@ -599,4 +602,4 @@ SPageMethods pageLargeMethods = { setLPageCellOffset, // setCellOffset getLPageFreeCellInfo, // getFreeCellInfo setLPageFreeCellInfo // setFreeCellInfo -}; \ No newline at end of file +}; From 98cbbc01975f78132c0ac90c0d0c1be6c73ef507 Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Thu, 16 Jun 2022 19:53:39 +0800 Subject: [PATCH 3/5] test: add auto exit case --- tests/system-test/test.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/system-test/test.py b/tests/system-test/test.py index 5a68f548da..f3e39fc9ce 100644 --- a/tests/system-test/test.py +++ b/tests/system-test/test.py @@ -13,6 +13,7 @@ # pip install src/connector/python/ # -*- coding: utf-8 -*- +from ast import If import sys import getopt import subprocess @@ -33,8 +34,15 @@ import taos def checkRunTimeError(): import win32gui + timeCount = 0 while 1: time.sleep(1) + timeCount = timeCount + 1 + if (timeCount>900): + os.system("TASKKILL /F /IM taosd.exe") + os.system("TASKKILL /F /IM taos.exe") + os.system("TASKKILL /F /IM tmq_sim.exe") + quit(0) hwnd = win32gui.FindWindow(None, "Microsoft Visual C++ Runtime Library") if hwnd: os.system("TASKKILL /F /IM taosd.exe") From c858b6952853677f3e2a25d5532b63a5114f7df6 Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Thu, 16 Jun 2022 19:56:51 +0800 Subject: [PATCH 4/5] test: add auto exit case --- tests/system-test/test.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/system-test/test.py b/tests/system-test/test.py index f3e39fc9ce..85f63a2868 100644 --- a/tests/system-test/test.py +++ b/tests/system-test/test.py @@ -13,7 +13,6 @@ # pip install src/connector/python/ # -*- coding: utf-8 -*- -from ast import If import sys import getopt import subprocess From 49d92079ca1005546eca0b87daba8fbdaee3e509 Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Thu, 16 Jun 2022 19:58:24 +0800 Subject: [PATCH 5/5] test: add auto exit case --- tests/system-test/test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/system-test/test.py b/tests/system-test/test.py index 85f63a2868..55bfd8c945 100644 --- a/tests/system-test/test.py +++ b/tests/system-test/test.py @@ -41,6 +41,7 @@ def checkRunTimeError(): os.system("TASKKILL /F /IM taosd.exe") os.system("TASKKILL /F /IM taos.exe") os.system("TASKKILL /F /IM tmq_sim.exe") + os.system("TASKKILL /F /IM mintty.exe") quit(0) hwnd = win32gui.FindWindow(None, "Microsoft Visual C++ Runtime Library") if hwnd: