Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed missing support for collations as strings #251

Merged
merged 1 commit into from
Jun 22, 2023
Merged
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
12 changes: 12 additions & 0 deletions go/vt/sqlparser/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2770,6 +2770,18 @@ var (
input: "CREATE DATABASE `somedb` CHARACTER SET binary CHARSET binary COLLATE binary collate binary encryption 'n' encryption 'n'",
output: "create database somedb character set binary charset binary collate binary collate binary encryption n encryption n",
}, {
input: "create table test (pk varchar(255) collate 'utf8_unicode_ci')",
output: "create table test (\n\tpk varchar(255) collate utf8_unicode_ci\n)",
}, {
input: "create table test (pk varchar(255) collate utf8_unicode_ci)",
output: "create table test (\n\tpk varchar(255) collate utf8_unicode_ci\n)",
}, {
input: "create table test (pk varchar(255)) collate 'utf8_unicode_ci'",
output: "create table test (\n\tpk varchar(255)\n) collate utf8_unicode_ci",
}, {
input: "create table test (pk varchar(255)) collate utf8_unicode_ci",
output: "create table test (\n\tpk varchar(255)\n) collate utf8_unicode_ci",
},{
input: "select * from current",
output: "select * from `current`",
}, {
Expand Down
Loading