mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
修复type不能作为别名 char()方法解析失败的问题
This commit is contained in:
@@ -415,7 +415,7 @@ public class MySqlExprParser extends SQLExprParser {
|
||||
expr = matchAgainstExpr;
|
||||
|
||||
return primaryRest(expr);
|
||||
} else if ("CONVERT".equalsIgnoreCase(ident)) {
|
||||
} else if (("CONVERT".equalsIgnoreCase(ident))||("CHAR".equalsIgnoreCase(ident))) {
|
||||
lexer.nextToken();
|
||||
SQLMethodInvokeExpr methodInvokeExpr = new SQLMethodInvokeExpr(ident);
|
||||
|
||||
|
||||
@@ -709,7 +709,7 @@ public class MySqlOutputVisitor extends SQLASTOutputVisitor implements MySqlASTV
|
||||
return false;
|
||||
}
|
||||
|
||||
if ("CONVERT".equalsIgnoreCase(x.getMethodName())) {
|
||||
if (("CONVERT".equalsIgnoreCase(x.getMethodName()))||"CHAR".equalsIgnoreCase(x.getMethodName())) {
|
||||
if (x.getOwner() != null) {
|
||||
x.getOwner().accept(this);
|
||||
print(".");
|
||||
|
||||
Reference in New Issue
Block a user