Skip to content
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
1 change: 1 addition & 0 deletions go/vt/sqlparser/keywords.go
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ var keywords = map[string]int{
"source_auto_position": SOURCE_AUTO_POSITION,
"source_connect_retry": SOURCE_CONNECT_RETRY,
"source_host": SOURCE_HOST,
"source_ssl": SOURCE_SSL,
"source_password": SOURCE_PASSWORD,
"source_port": SOURCE_PORT,
"source_retry_count": SOURCE_RETRY_COUNT,
Expand Down
40 changes: 22 additions & 18 deletions go/vt/sqlparser/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ var (
input: "change replication source to SOURCE_HOST = 'Host'",
output: "change replication source to source_host = Host",
},
{
input: "change replication source to SOURCE_HOST = 'Host', SOURCE_SSL = 1",
output: "change replication source to source_host = Host, source_ssl = 1",
},
{
input: "change replication source to SOURCE_HOST = 'Host', SOURCE_AUTO_POSITION=0",
output: "change replication source to source_host = Host, source_auto_position = 0",
Expand Down Expand Up @@ -4269,75 +4273,75 @@ var (
output: "alter table t",
},
{
input: "alter table t partition by hash ('values')",
input: "alter table t partition by hash ('values')",
output: "alter table t",
},
{
input: "alter table t partition by hash (col)",
input: "alter table t partition by hash (col)",
output: "alter table t",
},
{
input: "alter table t partition by linear hash (col)",
input: "alter table t partition by linear hash (col)",
output: "alter table t",
},
{
input: "alter table t partition by KEY (col)",
input: "alter table t partition by KEY (col)",
output: "alter table t",
},
{
input: "alter table t partition by KEY ALGORITHM = 7 (col)",
input: "alter table t partition by KEY ALGORITHM = 7 (col)",
output: "alter table t",
},
{
input: "alter table t partition by linear KEY ALGORITHM = 7 (col)",
input: "alter table t partition by linear KEY ALGORITHM = 7 (col)",
output: "alter table t",
},
{
input: "alter table t partition by RANGE (col)",
input: "alter table t partition by RANGE (col)",
output: "alter table t",
},
{
input: "alter table t partition by RANGE (i + j)",
input: "alter table t partition by RANGE (i + j)",
output: "alter table t",
},
{
input: "alter table t partition by RANGE (month(i))",
input: "alter table t partition by RANGE (month(i))",
output: "alter table t",
},
{
input: "alter table t partition by RANGE (concat(i))",
input: "alter table t partition by RANGE (concat(i))",
output: "alter table t",
},
{
input: "alter table t partition by RANGE COLUMNS (c1, c2, c3)",
input: "alter table t partition by RANGE COLUMNS (c1, c2, c3)",
output: "alter table t",
},
{
input: "alter table t partition by LIST (col)",
input: "alter table t partition by LIST (col)",
output: "alter table t",
},
{
input: "alter table t partition by LIST (i + j)",
input: "alter table t partition by LIST (i + j)",
output: "alter table t",
},
{
input: "alter table t partition by LIST (month(i))",
input: "alter table t partition by LIST (month(i))",
output: "alter table t",
},
{
input: "alter table t partition by LIST (concat(i))",
input: "alter table t partition by LIST (concat(i))",
output: "alter table t",
},
{
input: "alter table t partition by LIST COLUMNS (c1, c2, c3)",
input: "alter table t partition by LIST COLUMNS (c1, c2, c3)",
output: "alter table t",
},
{
input: "alter table t partition by linear hash (a) partitions 20",
input: "alter table t partition by linear hash (a) partitions 20",
output: "alter table t",
},
{
input: "alter table t partition by linear hash (a) partitions 10 subpartition by linear hash (b) subpartitions 20",
input: "alter table t partition by linear hash (a) partitions 10 subpartition by linear hash (b) subpartitions 20",
output: "alter table t",
},

Expand Down
Loading