Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions go/vt/sqlparser/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,9 @@ var (
}, {
input: "set charset default",
output: "set ",
}, {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would make sense to modify Set.Format to print both the Exprs and the charset (if non-null) so that this test (and all the ones above it) would more clearly show that the parser is preserving the charset.
https://github.com/tinyspeck/vitess/blame/master/go/vt/sqlparser/ast.go#L579-L587

input: "set wait_timeout = 3600, names 'utf8'",
output: "set wait_timeout = 3600",
}, {
input: "set session wait_timeout = 3600",
output: "set session wait_timeout = 3600",
Expand Down
Loading