From 912652c2e69372b20d81629fbc41e68a443bd23e Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Mon, 18 Jul 2022 20:30:28 +0800 Subject: [PATCH] shell: limit taos_history file size and rows --- tools/shell/src/shellEngine.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index 836e8899af..14cab041f6 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -766,12 +766,10 @@ void shellReadHistory() { endIndex = pHistory->hend; } for (int32_t i = (pHistory->hend + SHELL_MAX_HISTORY_SIZE - 1) % SHELL_MAX_HISTORY_SIZE; i != endIndex;) { - printf("%d ",i); taosFprintfFile(pFile, "%s\n", pHistory->hist[i]); i = (i + SHELL_MAX_HISTORY_SIZE - 1) % SHELL_MAX_HISTORY_SIZE; } taosFprintfFile(pFile, "%s\n", pHistory->hist[endIndex]); - printf("\n"); taosFsyncFile(pFile); taosCloseFile(&pFile); }