mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved mysql create function support, fix #3996
This commit is contained in:
@@ -3733,9 +3733,13 @@ public class SQLExprParser extends SQLParser {
|
||||
|
||||
if (lexer.token == Token.LPAREN) {
|
||||
lexer.nextToken();
|
||||
SQLExpr arg = this.expr();
|
||||
arg.setParent(charType);
|
||||
charType.addArgument(arg);
|
||||
if (typeNameHashCode == FnvHash.Constants.ENUM) {
|
||||
exprList(charType.getArguments(), charType);
|
||||
} else {
|
||||
SQLExpr arg = this.expr();
|
||||
arg.setParent(charType);
|
||||
charType.addArgument(arg);
|
||||
}
|
||||
accept(Token.RPAREN);
|
||||
}
|
||||
|
||||
@@ -3905,6 +3909,7 @@ public class SQLExprParser extends SQLParser {
|
||||
|| hash == FnvHash.Constants.TEXT
|
||||
|| hash == FnvHash.Constants.MEDIUMTEXT
|
||||
|| hash == FnvHash.Constants.LONGTEXT
|
||||
|| hash == FnvHash.Constants.ENUM
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user