Skip to content

Commit 39f2d14

Browse files
authored
Merge pull request #251 from dolthub/daylon/fix-collate-string
Fixed missing support for collations as strings
2 parents a7d3799 + 9a3029b commit 39f2d14

File tree

3 files changed

+8657
-8567
lines changed

3 files changed

+8657
-8567
lines changed

Diff for: go/vt/sqlparser/parse_test.go

+12
Original file line numberDiff line numberDiff line change
@@ -2770,6 +2770,18 @@ var (
27702770
input: "CREATE DATABASE `somedb` CHARACTER SET binary CHARSET binary COLLATE binary collate binary encryption 'n' encryption 'n'",
27712771
output: "create database somedb character set binary charset binary collate binary collate binary encryption n encryption n",
27722772
}, {
2773+
input: "create table test (pk varchar(255) collate 'utf8_unicode_ci')",
2774+
output: "create table test (\n\tpk varchar(255) collate utf8_unicode_ci\n)",
2775+
}, {
2776+
input: "create table test (pk varchar(255) collate utf8_unicode_ci)",
2777+
output: "create table test (\n\tpk varchar(255) collate utf8_unicode_ci\n)",
2778+
}, {
2779+
input: "create table test (pk varchar(255)) collate 'utf8_unicode_ci'",
2780+
output: "create table test (\n\tpk varchar(255)\n) collate utf8_unicode_ci",
2781+
}, {
2782+
input: "create table test (pk varchar(255)) collate utf8_unicode_ci",
2783+
output: "create table test (\n\tpk varchar(255)\n) collate utf8_unicode_ci",
2784+
},{
27732785
input: "select * from current",
27742786
output: "select * from `current`",
27752787
}, {

0 commit comments

Comments
 (0)