diff --git a/src/kit/shell/src/shellImport.c b/src/kit/shell/src/shellImport.c index a440db73015c16bb9afe2b5cfc3c387ab6725e9a..afd2d85daeb89092363226fe025f5301bad9a382 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 #