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

Support Varchar(MAX) #188

Merged
merged 6 commits into from
Sep 15, 2022
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
5 changes: 5 additions & 0 deletions go/vt/sqlparser/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4368,6 +4368,7 @@ func TestCreateTable(t *testing.T) {
" col_varchar3 varchar(3) character set ascii,\n" +
" col_varchar4 varchar(4) character set ascii collate ascii_bin,\n" +
" col_varchar5 varchar(5) character set ascii binary,\n" +
" col_varcharMax varchar(MAX),\n" +
" col_character_varying character varying,\n" +
" col_character_varying2 character varying(2),\n" +
" col_character_varying3 character varying(3) character set ascii,\n" +
Expand Down Expand Up @@ -4572,6 +4573,10 @@ func TestCreateTable(t *testing.T) {
input string
output string
}{{
// Tet varchar (MAX) syntax
input: "create table t (username varchar(MAX))",
output: "create table t (\n\tusername varchar(MAX)\n)",
}, {
// Test the signed keyword – as the default for numeric types, it is a no-op
input: "create table t (pk int signed primary key)",
output: "create table t (\n\tpk int primary key\n)",
Expand Down
Loading