Bug #87517 Support of foreign keys on partitioned tables, innodb engine
Submitted: 23 Aug 2017 17:27 Modified: 8 Dec 2021 14:07
Reporter: Zoltán Szalai Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Partitions Severity:S4 (Feature request)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: foreign key, innodb, partition

[23 Aug 2017 17:27] Zoltán Szalai
Description:
I would like to have a database, wich is:
- normalised, small enough to fit entirely in memory
- has a lot of constrains (foreign keys) to force data consistency
- speeded up by partitioned tables
- uses innodb tables

At the moment, foreign keys (and other constrains, maybe?), and references by foreign keys from other tables are not supported on partitioned innodb tables.

So I have to drop all foreign keys, risking database corruption or I have to deal with speed issues without partitioning.  

How to repeat:
This is a feature request, not a bug. The problem is already described in the 5.1 .. 8.0 manuals. See for example the 5.7 reference manual, chapter 22.6 Restrictions and Limitations on Partitioning. (Foreign keys not supported for partitioned InnoDB tables.) 

Suggested fix:
I assume that it will not be added back to 5.7 / 5.6, but having this feature in 8.x would be nice.
[8 Dec 2021 14:07] MySQL Verification Team
Hello Zoltán Szalai,

Thank you for the feature request!

regards,
Umesh