提交 f0772b14 编写于 作者: wmmhello's avatar wmmhello

fix/TD-10717 <fix> tips if insert operation using multi empty comma

上级 4fae4c96
......@@ -1419,6 +1419,11 @@ int tsParseInsertSql(SSqlObj *pSql) {
goto _clean;
}
if (sToken.type == TK_ILLEGAL) { // ,,,, like => insert into t values(now,1),,,,(now+1s,2);
code = tscSQLSyntaxErrMsg(pInsertParam->msg, NULL, str);
goto _clean;
}
/*
* if no data has been generated during parsing the sql string, error msg will return
* Otherwise, create the first submit block and submit to virtual node.
......
......@@ -626,6 +626,7 @@ SStrToken tStrGetToken(char* str, int32_t* i, bool isPrevOptr) {
while (isspace(t) || t == ',') {
if (t == ',' && (++numOfComma > 1)) { // comma only allowed once
t0.n = 0;
t0.type = TK_ILLEGAL;
return t0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册