-
Notifications
You must be signed in to change notification settings - Fork 2.3k
onlineddl: ALTER VITESS_MIGRATION CANCEL CONTEXT 'ctx'
#20146
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
Changes from 7 commits
3cdc2be
788f845
ce0bec7
7efe450
f665340
44cecf6
0b71846
3b06ef4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -337,7 +337,11 @@ func (node *AlterMigration) Format(buf *TrackedBuffer) { | |
| case CancelMigrationType: | ||
| alterType = "cancel" | ||
| case CancelAllMigrationType: | ||
| alterType = "cancel all" | ||
| if node.Context != "" { | ||
| alterType = "cancel" | ||
| } else { | ||
| alterType = "cancel all" | ||
| } | ||
| case ThrottleMigrationType: | ||
| alterType = "throttle" | ||
| case ThrottleAllMigrationType: | ||
|
|
@@ -355,16 +359,19 @@ func (node *AlterMigration) Format(buf *TrackedBuffer) { | |
| } | ||
| buf.astPrintf(node, " %#s", alterType) | ||
| if node.Threshold != "" { | ||
| buf.astPrintf(node, " '%#s'", node.Threshold) | ||
| buf.astPrintf(node, " %s", encodeSQLString(node.Threshold)) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should these remain as
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In my understanding the
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It does seem to apply to literals as well, here's an example unit test: 300c07d
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done and pushed! Interestingly |
||
| } | ||
| if node.Expire != "" { | ||
| buf.astPrintf(node, " expire '%#s'", node.Expire) | ||
| buf.astPrintf(node, " expire %s", encodeSQLString(node.Expire)) | ||
| } | ||
| if node.Ratio != nil { | ||
| buf.astPrintf(node, " ratio %v", node.Ratio) | ||
| } | ||
| if node.Context != "" { | ||
| buf.astPrintf(node, " context %s", encodeSQLString(node.Context)) | ||
| } | ||
|
shlomi-noach marked this conversation as resolved.
|
||
| if node.Shards != "" { | ||
| buf.astPrintf(node, " vitess_shards '%#s'", node.Shards) | ||
| buf.astPrintf(node, " vitess_shards %s", encodeSQLString(node.Shards)) | ||
| } | ||
| } | ||
|
|
||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.