diff --git a/polardbx-parser/src/main/java/com/alibaba/polardbx/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java b/polardbx-parser/src/main/java/com/alibaba/polardbx/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java index 3e98b16b0..6c8921f6b 100644 --- a/polardbx-parser/src/main/java/com/alibaba/polardbx/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java +++ b/polardbx-parser/src/main/java/com/alibaba/polardbx/druid/sql/dialect/mysql/visitor/MySqlOutputVisitor.java @@ -3352,12 +3352,20 @@ public void endVisit(MySqlShowBinaryLogsStatement x) { @Override public boolean visit(MySqlShowBinaryLogsStatement x) { print0(ucase ? "SHOW BINARY LOGS" : "show binary logs"); + if (x.getWith() != null) { + print0(ucase ? " WITH " : " with "); + x.getWith().accept(this); + } return false; } @Override public boolean visit(MySqlShowMasterLogsStatement x) { print0(ucase ? "SHOW MASTER LOGS" : "show master logs"); + if (x.getWith() != null) { + print0(ucase ? " WITH " : " with "); + x.getWith().accept(this); + } return false; } @@ -3388,6 +3396,10 @@ public void endVisit(MySqlShowCollationStatement x) { @Override public boolean visit(MySqlShowBinLogEventsStatement x) { print0(ucase ? "SHOW BINLOG EVENTS" : "show binlog events"); + if (x.getWith() != null) { + print0(ucase ? " WITH " : " with "); + x.getWith().accept(this); + } if (x.getIn() != null) { print0(ucase ? " IN " : " in "); x.getIn().accept(this);