diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 58668b661a26637e4f96c22a7be4926e9f772feb..9f34d30cadea69a66807c4ae44baaf49f5caf2ea 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -7799,13 +7799,18 @@ int32_t doCheckForStream(SSqlObj* pSql, SSqlInfo* pInfo) { SRelElementPair* p1 = taosArrayGet(pFromInfo->list, 0); SStrToken srcToken = {.z = p1->tableName.z, .n = p1->tableName.n, .type = p1->tableName.type}; - + bool dbIncluded2 = false; - if (tscValidateName(&srcToken, true, &dbIncluded2) != TSDB_CODE_SUCCESS) { + char buf[TSDB_TABLE_FNAME_LEN]; + SStrToken sTblToken; + sTblToken.z = buf; + + int32_t code = validateTableName(srcToken.z, srcToken.n, &sTblToken, &dbIncluded2); + if (code != TSDB_CODE_SUCCESS) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); } - int32_t code = tscSetTableFullName(&pTableMetaInfo->name, &srcToken, pSql, dbIncluded2); + code = tscSetTableFullName(&pTableMetaInfo->name, &sTblToken, pSql, dbIncluded2); if (code != TSDB_CODE_SUCCESS) { return code; }