bug: 修复多出解析bug

This commit is contained in:
fanglei
2020-11-04 20:38:11 +08:00
parent 4b3ed4c714
commit f1089660a1
4 changed files with 24 additions and 10 deletions
@@ -595,6 +595,9 @@ public class SQLStatementParser extends SQLParser {
SQLStatement dialectStmt = statementList.get(j);
dialectStmt.setParent(parent);
}
if (parent instanceof SQLCreateTriggerStatement) {
return;
}
}
continue;
@@ -3848,7 +3851,7 @@ public class SQLStatementParser extends SQLParser {
stmt.setWhen(condition);
}
List<SQLStatement> body = this.parseStatementList();
List<SQLStatement> body = this.parseStatementList(stmt);
if (body == null || body.isEmpty()) {
throw new ParserException("syntax error");
}