mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
improved sql parser. for issue #1675
This commit is contained in:
@@ -110,6 +110,9 @@ public class MySqlCreateTableParser extends SQLCreateTableParser {
|
||||
lexer.nextToken();
|
||||
SQLName name = this.exprParser.name();
|
||||
stmt.setLike(name);
|
||||
} else if (lexer.token() == Token.SELECT) {
|
||||
SQLSelect query = new MySqlSelectParser(this.exprParser).select();
|
||||
stmt.setSelect(query);
|
||||
} else {
|
||||
for (;;) {
|
||||
if (lexer.token() == Token.IDENTIFIER //
|
||||
|
||||
@@ -484,10 +484,10 @@ public class MySqlOutputVisitor extends SQLASTOutputVisitor implements MySqlASTV
|
||||
}
|
||||
|
||||
if (x.getSelect() != null) {
|
||||
this.indentCount++;
|
||||
println();
|
||||
print0(ucase ? "AS" : "as");
|
||||
println();
|
||||
x.getSelect().accept(this);
|
||||
this.indentCount--;
|
||||
}
|
||||
|
||||
for (SQLCommentHint hint : x.getOptionHints()) {
|
||||
|
||||
Reference in New Issue
Block a user