Skip to content

Commit

Permalink
Merge pull request #323 from dolthub/fulghum/source_auto_position
Browse files Browse the repository at this point in the history
Parser support for `SOURCE_AUTO_POSITION`
  • Loading branch information
fulghum committed Mar 21, 2024
2 parents a0bbde8 + cc8a2fd commit ad95f0d
Show file tree
Hide file tree
Showing 4 changed files with 9,777 additions and 9,742 deletions.
1 change: 1 addition & 0 deletions go/vt/sqlparser/keywords.go
Expand Up @@ -542,6 +542,7 @@ var keywords = map[string]int{
"slow": SLOW,
"smallint": SMALLINT,
"source": SOURCE,
"source_auto_position": SOURCE_AUTO_POSITION,
"source_connect_retry": SOURCE_CONNECT_RETRY,
"source_host": SOURCE_HOST,
"source_password": SOURCE_PASSWORD,
Expand Down
4 changes: 4 additions & 0 deletions go/vt/sqlparser/parse_test.go
Expand Up @@ -139,6 +139,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_AUTO_POSITION=0",
output: "change replication source to source_host = Host, source_auto_position = 0",
},
{
input: "change replication source to SOURCE_HOST = 'host', SOURCE_PASSWORD='PaSSword', SOURCE_PORT=12345, source_user='root', SOURCE_CONNECT_RETRY=60, SOURCE_RETRY_COUNT=3",
output: "change replication source to source_host = host, source_password = PaSSword, source_port = 12345, source_user = root, source_connect_retry = 60, source_retry_count = 3",
Expand Down

0 comments on commit ad95f0d

Please sign in to comment.