diff --git a/src/client/src/tscParseInsert.c b/src/client/src/tscParseInsert.c index bba9db86c53e7d737c64d44e4135c40fad2e0458..40092c586011708dc62fe8761c2e4708dfd29536 100644 --- a/src/client/src/tscParseInsert.c +++ b/src/client/src/tscParseInsert.c @@ -954,6 +954,10 @@ static int32_t tscCheckIfCreateTable(char **sqlstr, SSqlObj *pSql, char** boundC break; } + if (sToken.n == 0 || sToken.type == TK_SEMI || index == 0) { + return tscSQLSyntaxErrMsg(pCmd->payload, "unexpected token", sql); + } + sql += index; ++numOfColsAfterTags; }