-
Notifications
You must be signed in to change notification settings - Fork 2k
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
More explicit message on online DDL parsing error #8118
Conversation
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
|
…) to extract parsing error. Remove legacy check for alter options Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Undid changes to the AST, there is no need to modify AST. |
This PR is good to go and high priority to merge. |
go/vt/schema/online_ddl.go
Outdated
} | ||
|
||
if err := sqlparser.Walk(errorOnFKWalk, ddlStmt); err == ErrForeignKeyFound { | ||
return vterrors.Errorf(vtrpcpb.Code_ABORTED, "foreign key constraint are not supported in online DDL") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return vterrors.Errorf(vtrpcpb.Code_ABORTED, "foreign key constraint are not supported in online DDL") | |
return vterrors.Errorf(vtrpcpb.Code_ABORTED, "foreign key constraints are not supported in online DDL") |
Also, it will be nice to link to the blog post explaining why.
Signed-off-by: deepthi <deepthi@planetscale.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have addressed my own review comment.
Now LGTM.
Description
When submitting an Online DDL request, and the query has a syntax error/typo, Vitess today returns a vague
cannot parse statement
message.With this PR, Vitess returns the precise parsing error&position. e.g., right now Vitess does not support
GENERATED
(notice: fixed by #8117):Related Issue(s)
Fixes #8109
Checklist
cc @mavenraven @deepthi @piki @sougou