Details
-
New Feature
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
Description
Implement cross-engine foreign keys check at SQL layer.
TODO:
- Referenced/foreign key lookup procedure
- Recursive table open (new FK structure for TABLE optimized for DML, FKs in TABLE point to parent TABLEs)
- Recursive prelocking: write-locking for CASCADE actions
- DML changes:
UPDATE, Multi-UPDATE
DELETE, Multi-DELETE
REPLACE
INSERT ODKU
IGNORE clause
Ignore ‘DELAYED’
- DDL changes:
DROP TABLE (DATABASE)
Attachments
Issue Links
- blocks
-
MDEV-17440 ON DELETE CASCADE does not always delete rows even if it could
-
- Confirmed
-
- includes
-
MDEV-34403 Self-referencing table produces "Got error 193" from InnoDB on cascading DELETE
-
- Confirmed
-
- is blocked by
-
MDEV-16417 Store Foreign Key metadata outside of InnoDB
-
- In Review
-
- relates to
-
MDEV-17598 InnoDB index option for per-record transaction ID
-
- Open
-
-
MDEV-20777 Foreign keys without indexes
-
- Open
-
-
MDEV-26554 Table-rebuilding DDL on parent table causes crash for INSERT into child table
-
- Closed
-
-
MDEV-31942 Online alter: support cascade foreign keys
-
- Open
-
-
MDEV-12483 Add foreign keys support for partitioned tables
-
- Stalled
-
-
MDEV-13538 better error reporting when FOREIGN KEY CONSTRAINT fails
-
- Closed
-
-
MDEV-22363 Reimplement the InnoDB virtual column code
-
- Open
-
-
MDEV-23716 FK validate data but in select join tables parent and child don't search data
-
- Closed
-
-
MDEV-26096 Constraints: support deferred constraints [WAS: Make the Unique index ONLY evaluate immediately before the commit (NOT after each UPDATE)]
-
- Open
-
-
MDEV-26097 Constraints: support deferred constraints
-
- Closed
-
-
MDEV-26675 Multiple Foreign Keys to same column and a multi-column index cause foreign key constraints to fail
-
- Stalled
-
-
MDEV-34403 Self-referencing table produces "Got error 193" from InnoDB on cascading DELETE
-
- Confirmed
-
-
MDEV-36348 Query Optimization for Counting Foreign Key Records Not Found in Parent Key even after adding indexes
-
- Closed
-
- links to
Implementing FOREIGN KEY processing in the SQL layer should also trivially fix MySQL Bug#11472 Triggers not executed following foreign key updates/deletes.
The cause of the bug is that the InnoDB storage engine, which currently is responsible for enforcing FOREIGN KEY relationships, is executing ON DELETE or ON UPDATE clauses internally, without invoking any code outside the storage engine to execute any triggers.