[MDEV-30674] Implement CHECK constraints validation on cascading updates Created: 2023-02-17 Updated: 2023-11-05 Resolved: 2023-11-05 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Create Table, Storage Engine - InnoDB |
| Fix Version/s: | N/A |
| Type: | Task | Priority: | Major |
| Reporter: | Valerii Kravchuk | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | check, check_constraints | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| Description |
|
If a field is a part of a foreign key with a ON UPDATE CASCADE action, it can be updated internally by InnoDB without informing the server and without validating the CHECK constraint. In other words, such cascading updates can invalidate the constraint and that's why they are not supported since It was stated that It's possible to implement CHECK constraint validation on cascading updates, hence this task to do this in version 11.1+ at least. |
| Comments |
| Comment by Marko Mäkelä [ 2023-02-17 ] |
|
I believe that this could be fixed as a consequence of fixing MDEV-12302. |
| Comment by Sergei Golubchik [ 2023-03-03 ] |
|
marko, yes, that's exactly what I meant. CHECK constraints, long uniques, unique constraints WITHOUT OVERLAP, system versioning — this will all be possible after MDEV-12302. I suppose InnoDB handles generated columns (stored and indexed virtual) internally already. |
| Comment by Michael Widenius [ 2023-11-05 ] |
|
MDEV-12302 was created 6 years ago. We have to re-prioritize this one and fix this. |