fix td-851

This commit is contained in:
Bomin Zhang 2020-08-17 11:18:48 +08:00
parent 4361c2bcee
commit 5994bed21b
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}