From bd18da35fc1020ff3a0cea6314ba8b3fa91baf4c Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Fri, 9 Dec 2022 01:55:59 +0800 Subject: [PATCH] opti:modify logic for telnet and json in schemaless --- source/client/src/clientSml.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/client/src/clientSml.c b/source/client/src/clientSml.c index 1d8cbe6a9d..e239255987 100644 --- a/source/client/src/clientSml.c +++ b/source/client/src/clientSml.c @@ -43,7 +43,7 @@ #define JUMP_SPACE(sql, sqlEnd) \ while (sql < sqlEnd) { \ - if (*sql == SPACE) \ + if (unlikely(*sql == SPACE)) \ sql++; \ else \ break; \ @@ -1695,7 +1695,7 @@ static void smlParseTelnetElement(char **sql, char *sqlEnd, char **data, int32_t } static int32_t smlParseTelnetTags(SSmlHandle *info, char *data, char *sqlEnd, SSmlLineInfo *elements, SSmlMsgBuf *msg) { - if(is_same_child_table_telnet(elements, &info->preLine)){ + if(is_same_child_table_telnet(elements, &info->preLine) == 0){ return TSDB_CODE_SUCCESS; } @@ -1915,6 +1915,7 @@ static int32_t smlParseTelnetString(SSmlHandle *info, char *sql, char *sqlEnd, S }else{ return TSDB_CODE_TSC_INVALID_VALUE; } + JUMP_SPACE(sql, sqlEnd) elements->tags = sql; elements->tagsLen = sqlEnd - sql; -- GitLab