mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for sql parser. for issue #1910
This commit is contained in:
+1
-1
@@ -241,7 +241,7 @@ public class MySqlCreateTableParser extends SQLCreateTableParser {
|
||||
if (lexer.token() == Token.EQ) {
|
||||
lexer.nextToken();
|
||||
}
|
||||
stmt.getTableOptions().put("COMMENT", this.exprParser.expr());
|
||||
stmt.setComment(this.exprParser.expr());
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -536,6 +536,12 @@ public class MySqlOutputVisitor extends SQLASTOutputVisitor implements MySqlASTV
|
||||
option.getValue().accept(this);
|
||||
}
|
||||
|
||||
SQLExpr comment = x.getComment();
|
||||
if (comment != null) {
|
||||
print0(ucase ? " COMMENT " : " comment ");
|
||||
comment.accept(this);
|
||||
}
|
||||
|
||||
if (x.getPartitioning() != null) {
|
||||
println();
|
||||
x.getPartitioning().accept(this);
|
||||
|
||||
Reference in New Issue
Block a user