Store Foreign Key metadata outside of InnoDB
(MDEV-16417)
|
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 11.5 |
| Type: | Technical task | Priority: | Major |
| Reporter: | Aleksey Midenkov | Assignee: | Aleksey Midenkov |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | foreign-keys | ||
| Issue Links: |
|
||||||||
| Description |
|
When child table is created before parent table like in the example below:
parent doesn't know anything about child. We cannot acknowledge child by scanning because it would require to scan all the databases on every CREATE TABLE. But we can discover the child when DML happens on it. MDEV-21052 solved the problem of updating parent's TABLE_SHARE. This task is the subject of updating parent's FRM file:
Note that we don't want to scan all databases for collecting referenced hints and thus we cannot repair `parent` directly by repair table parent: only REPAIR TABLE on `child` fixes missing hints of foreign keys `child` provides. |