From 36e1deb0de41001c9af86eb4f7eb5574bd0349db Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Wed, 23 Nov 2022 10:43:56 +0800 Subject: [PATCH 1/2] fix(shell): output redirect to file need not call fflush --- source/os/src/osFile.c | 1 - 1 file changed, 1 deletion(-) diff --git a/source/os/src/osFile.c b/source/os/src/osFile.c index 94a10322ed..3003cf84eb 100644 --- a/source/os/src/osFile.c +++ b/source/os/src/osFile.c @@ -739,7 +739,6 @@ void taosFprintfFile(TdFilePtr pFile, const char *format, ...) { va_start(ap, format); vfprintf(pFile->fp, format, ap); va_end(ap); - fflush(pFile->fp); } bool taosValidFile(TdFilePtr pFile) { return pFile != NULL && pFile->fd > 0; } From 3ad83db5b7d2a2a5b7272fe67e79e61efa87aaae Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Wed, 23 Nov 2022 10:55:28 +0800 Subject: [PATCH 2/2] fix(query): remove 2.6 test code --- source/libs/executor/src/executor.c | 45 ----------------------------- 1 file changed, 45 deletions(-) diff --git a/source/libs/executor/src/executor.c b/source/libs/executor/src/executor.c index 7dad9245d5..c1974ff30e 100644 --- a/source/libs/executor/src/executor.c +++ b/source/libs/executor/src/executor.c @@ -480,51 +480,6 @@ _error: return code; } -#ifdef TEST_IMPL -// wait moment -int waitMoment(SQInfo* pQInfo) { - if (pQInfo->sql) { - int ms = 0; - char* pcnt = strstr(pQInfo->sql, " count(*)"); - if (pcnt) return 0; - - char* pos = strstr(pQInfo->sql, " t_"); - if (pos) { - pos += 3; - ms = atoi(pos); - while (*pos >= '0' && *pos <= '9') { - pos++; - } - char unit_char = *pos; - if (unit_char == 'h') { - ms *= 3600 * 1000; - } else if (unit_char == 'm') { - ms *= 60 * 1000; - } else if (unit_char == 's') { - ms *= 1000; - } - } - if (ms == 0) return 0; - printf("test wait sleep %dms. sql=%s ...\n", ms, pQInfo->sql); - - if (ms < 1000) { - taosMsleep(ms); - } else { - int used_ms = 0; - while (used_ms < ms) { - taosMsleep(1000); - used_ms += 1000; - if (isTaskKilled(pQInfo)) { - printf("test check query is canceled, sleep break.%s\n", pQInfo->sql); - break; - } - } - } - } - return 1; -} -#endif - static void freeBlock(void* param) { SSDataBlock* pBlock = *(SSDataBlock**)param; blockDataDestroy(pBlock);