bug: mysql支持解析if...elseif...elseif...end

This commit is contained in:
fanglei
2020-11-03 13:26:17 +08:00
parent 323fbff638
commit 4b3ed4c714
6 changed files with 58 additions and 24 deletions
@@ -582,7 +582,12 @@ public class SQLStatementParser extends SQLParser {
stmt.setParent(parent);
continue;
}
if (lexer.token() == Token.ELSEIF
&& parent instanceof SQLIfStatement) {
break;
}
int size = statementList.size();
if (parseStatementListDialect(statementList)) {
if (parent != null) {
@@ -132,7 +132,7 @@ public enum Token {
SHOW("SHOW"),
REPLACE("REPLACE"),
PERIOD("PERIOD"),
ELSEIF("ELSEIF"),
BITS,
// MySql procedure add by zz