Merge pull request #6277 from taosdata/hotfix/TD-4411

[TD-4411]taos hangs for invalid character
This commit is contained in:
haojun Liao 2021-05-29 14:42:11 +08:00 committed by GitHub
commit 934517b0b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -769,6 +769,10 @@ static int32_t tscCheckIfCreateTable(char **sqlstr, SSqlObj *pSql, char** boundC
index = 0; index = 0;
sToken = tStrGetToken(sql, &index, false); sToken = tStrGetToken(sql, &index, false);
if (sToken.type == TK_ILLEGAL) {
return tscSQLSyntaxErrMsg(pCmd->payload, "unrecognized token", sToken.z);
}
if (sToken.type == TK_RP) { if (sToken.type == TK_RP) {
break; break;
} }