From 22d60979f89459bb8b16f17e5979e4cab0e948ea Mon Sep 17 00:00:00 2001 From: Tao Liu Date: Sat, 11 Jul 2020 06:52:45 +0000 Subject: [PATCH] [TD-810] fix the shellTableSQLFile length --- src/kit/shell/src/shellImport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kit/shell/src/shellImport.c b/src/kit/shell/src/shellImport.c index a440db7301..afd2d85dae 100644 --- a/src/kit/shell/src/shellImport.c +++ b/src/kit/shell/src/shellImport.c @@ -136,7 +136,7 @@ static void shellGetDirectoryFileList(char *inputDir) static void shellSourceFile(TAOS *con, char *fptr) { wordexp_t full_path; int read_len = 0; - char * cmd = malloc(MAX_COMMAND_SIZE); + char * cmd = malloc(tsMaxSQLStringLen); size_t cmd_len = 0; char * line = NULL; size_t line_len = 0; @@ -185,7 +185,7 @@ static void shellSourceFile(TAOS *con, char *fptr) { int lineNo = 0; while ((read_len = getline(&line, &line_len, f)) != -1) { ++lineNo; - if (read_len >= MAX_COMMAND_SIZE) continue; + if (read_len >= tsMaxSQLStringLen) continue; line[--read_len] = '\0'; if (read_len == 0 || isCommentLine(line)) { // line starts with #