-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
could create partition table with FOREIGN KEY #32234
Comments
So the issue is that there is no error when using foreign keys on partitioned tables, when MySQL would issue one:
But since TiDB does not support Foreign keys currently I do not think we should return an error for foreign keys on partitioned tables, since we do not do it for non-partitioned tables where we also do not support it (or rather we parse it and store the constraints, but we do not check or enforce the foreign key constraints). Reference to Foreign key support in documentation: https://docs.pingcap.com/tidb/dev/constraints#foreign-key I think this should be a feature request and maybe even closed as a duplicate of #18209. |
@zimulala Since it is an enhancement, I think we could keep it open. |
Just checked v6.6.0, where foreign key starts to be supported in TiDB and it fails with the same error as in MySQL:
(Same in nightly build of v7.2.0-alpha commit hash 94371a4) Closing this issue |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
failed to create table
product_order
3. What did you see instead (Required)
create table
product_order
successfully4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: