From 1260d0979bc18daeb97f340f374d3d7c6dbae3d8 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Thu, 26 Aug 2021 16:21:23 +0800 Subject: [PATCH] [TS-165] fix space error when parse sql --- src/util/src/tutil.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/src/tutil.c b/src/util/src/tutil.c index 7987d95dca..1a73991ade 100644 --- a/src/util/src/tutil.c +++ b/src/util/src/tutil.c @@ -223,7 +223,7 @@ char *paGetToken(char *string, char **token, int32_t *tokenLen) { char quote = 0; while (*string != 0) { - if (isspace(*string)) { + if (*string == ' ' || *string == '\t') { ++string; } else { break; @@ -244,12 +244,12 @@ char *paGetToken(char *string, char **token, int32_t *tokenLen) { break; } - if (*string == '#' || isspace(*string)) { + if (*string == '#' || *string == '\n' || *string == '\r') { *string = 0; break; } - if (isspace(*string) && !quote) { + if ((*string == ' ' || *string == '\t') && !quote) { break; } else { ++string; -- GitLab