From 7c008851e13814c0f494d7d8fa12008ca02c85ea Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Fri, 22 Jan 2021 00:34:37 +0000 Subject: [PATCH] TD-2850 --- src/client/src/tscSQLParser.c | 1 + src/client/src/tscUtil.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index ec699408de..4811a3b35d 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -5427,6 +5427,7 @@ int32_t validateColumnName(char* name) { if (token.type == TK_STRING) { strdequote(token.z); + strntolower(token.z, token.z, token.n); token.n = (uint32_t)strtrim(token.z); int32_t k = tSQLGetToken(token.z, &token.type); diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index d045000e24..bad4a870d5 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -1420,9 +1420,11 @@ int32_t tscValidateName(SStrToken* pToken) { char* sep = strnchr(pToken->z, TS_PATH_DELIMITER[0], pToken->n, true); if (sep == NULL) { // single part if (pToken->type == TK_STRING) { + strdequote(pToken->z); + strntolower(pToken->z, pToken->z, pToken->n); pToken->n = (uint32_t)strtrim(pToken->z); - + int len = tSQLGetToken(pToken->z, &pToken->type); // single token, validate it -- GitLab