diff --git a/src/client/src/tscParseInsert.c b/src/client/src/tscParseInsert.c index 03e2241437d9af874f524a66d9f2710dfe94affa..a6b70aeea7ad504fc241b82304b4e511c351c188 100644 --- a/src/client/src/tscParseInsert.c +++ b/src/client/src/tscParseInsert.c @@ -821,12 +821,12 @@ static int32_t tscParseSqlForCreateTableOnDemand(char **sqlstr, SSqlObj *pSql) { if (spd.numOfAssignedCols == 0 || spd.numOfAssignedCols > numOfTags) { return tscInvalidSQLErrMsg(pCmd->payload, "tag name expected", sToken.z); } + + index = 0; + sToken = tStrGetToken(sql, &index, false, 0, NULL); + sql += index; } - index = 0; - sToken = tStrGetToken(sql, &index, false, 0, NULL); - sql += index; - if (sToken.type != TK_TAGS) { return tscInvalidSQLErrMsg(pCmd->payload, "keyword TAGS expected", sToken.z); }