diff --git a/src/client/src/tscParseInsert.c b/src/client/src/tscParseInsert.c index e97d6c32e02c60f16da34ae31697e5386ca2fd6c..cb49bd80b7720f74e751945f6202024ee26587f6 100644 --- a/src/client/src/tscParseInsert.c +++ b/src/client/src/tscParseInsert.c @@ -904,6 +904,11 @@ static int32_t tscCheckIfCreateTable(char **sqlstr, SSqlObj *pSql) { sToken = tStrGetToken(sql, &index, true, numOfIgnoreToken, &ignoreTokenTypes); sql += index; + if (TK_ILLEGAL == sToken.type) { + tdDestroyKVRowBuilder(&kvRowBuilder); + return TSDB_CODE_TSC_INVALID_SQL; + } + if (sToken.n == 0 || sToken.type == TK_RP) { break; }