-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Online DDL: explicitly reject FOREIGN KEY DDLs #8055
Comments
Our parsing for alter table corder add FOREIGN KEY (customer_id) references customer(customer_id); But are unable to parse the following valid MySQL statement: alter table corder add FOREIGN KEY my_fk (customer_id) references customer(customer_id); The 2nd query creates, in addition to the foreign key, an index called |
There's two aspects to this problem. One is the specific parsing limitation mentioned above (work in progress), and the other is #8057 |
For online-ddl you should disable partialDDL |
Not sure I understand? |
If you disable partialDDL then any DDL which the parser does not understand completely will fail and this will make parser output reliable to be used to manipulating or verifying those DDLs |
I can't find how to disable partialDDL? |
Online DDL does not support
FOREIGN KEY
s at this time, and this is documented.Right now a schema migration that has a
FOREIGN KEY
clause fails with an obscure parsing error. e.g.:We should do better analysis of the query/schema to determine that it contains
FOREIGN KEY
constraints and clearly indicate these are not supported.The text was updated successfully, but these errors were encountered: