diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index e36a81b387fdfe911718323786c89cad27ce0bb9..22456782d0341c3ad35299dfa589870ec23bb85a 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -1511,7 +1511,6 @@ int32_t tscSetTableFullName(SName* pName, SStrToken* pTableName, SSqlObj* pSql, const char* msg4 = "db name too long"; const char* msg5 = "table name too long"; const char* msg6 = "table name empty"; - const char* msg7 = "invalid table name"; SSqlCmd* pCmd = &pSql->cmd; int32_t code = TSDB_CODE_SUCCESS; @@ -1576,15 +1575,6 @@ int32_t tscSetTableFullName(SName* pName, SStrToken* pTableName, SSqlObj* pSql, } } - if (code != 0) { - return code; - } - - bool ret = taosIsKeyWordToken(pName->tname, (int32_t) strlen(pName->tname)); - if (ret) { - code = invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg7); - } - return code; } diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index c27ceac50cb24ddbd02cdc1b24bc645f1372e90e..5c6fb2dc751ee4325f00334079c15c5732b33021 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -3014,8 +3014,8 @@ int32_t tscValidateName(SStrToken* pToken, bool escapeEnabled, bool *dbIncluded) // single token, validate it if (len == pToken->n) { - if (strncmp(pToken->z, "string", len) == 0) { - return TSDB_CODE_SUCCESS; + if (taosIsKeyWordToken(pToken->z, (int32_t) pToken->n)) { + return TSDB_CODE_TSC_INVALID_OPERATION; } return validateQuoteToken(pToken, escapeEnabled, NULL);