bug fixed for sql parser. for issue #1910

This commit is contained in:
wenshao
2017-08-16 14:19:02 +08:00
parent 4b7093dc6a
commit 97ed996c05
22 changed files with 440 additions and 64 deletions
@@ -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);