mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
fix parser bug
This commit is contained in:
@@ -503,9 +503,11 @@ public class Lexer {
|
||||
token = LITERAL_CHARS;
|
||||
break;
|
||||
} else {
|
||||
System.arraycopy(buf, np + 1, sbuf, 0, sp);
|
||||
hasSpecial = true;
|
||||
putChar('\'');
|
||||
if (!hasSpecial) {
|
||||
System.arraycopy(buf, np + 1, sbuf, 0, sp);
|
||||
hasSpecial = true;
|
||||
}
|
||||
putChar('\'');
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,18 +34,18 @@ public class ParameterizedOutputVisitorUtils {
|
||||
|
||||
public static SQLASTOutputVisitor createParameterizedOutputVisitor(Appendable out, String dbType) {
|
||||
if (JdbcUtils.ORACLE.equals(dbType)) {
|
||||
return new OracleParameterizedOutputVisitor();
|
||||
return new OracleParameterizedOutputVisitor(out);
|
||||
}
|
||||
|
||||
if (JdbcUtils.MYSQL.equals(dbType)) {
|
||||
return new MySqlParameterizedOutputVisitor();
|
||||
return new MySqlParameterizedOutputVisitor(out);
|
||||
}
|
||||
|
||||
if (JdbcUtils.POSTGRESQL.equals(dbType)) {
|
||||
return new PGParameterizedOutputVisitor();
|
||||
return new PGParameterizedOutputVisitor(out);
|
||||
}
|
||||
|
||||
return new ParameterizedOutputVisitor();
|
||||
return new ParameterizedOutputVisitor(out);
|
||||
}
|
||||
|
||||
public static boolean visit(SQLASTOutputVisitor v, SQLInListExpr x) {
|
||||
|
||||
Reference in New Issue
Block a user