support mysql create trigger/begin...end & fix issue #782

This commit is contained in:
Yako
2015-02-08 22:44:58 +08:00
parent a6d0d6eae7
commit 99fbfb364c
9 changed files with 189 additions and 3 deletions
@@ -1409,8 +1409,11 @@ public class SQLStatementParser extends SQLParser {
stmt.setForEachRow(true);
}
SQLStatement body = this.parseBlock();
stmt.setBody(body);
List<SQLStatement> body = this.parseStatementList();
if(body == null || body.isEmpty()) {
throw new ParserException("syntax error");
}
stmt.setBody(body.get(0));
return stmt;
}