Details
-
Task
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
None
Description
Currently InnoDB uses internal parser for adding foreign keys. Remove internal parser and use data parsed by SQL parser (sql_yacc) for adding foreign keys. This allows to pass some additional data from SQL layer like whether the referenced table is SYSTEM_TIME partitioned (MDEV-19191) and is required for further improvements (MDEV-16417, MDEV-10393, MDEV-12483).
Attachments
Issue Links
- blocks
-
MDEV-10393 Foreign keys SET DEFAULT action
-
- Open
-
-
MDEV-12483 Add foreign keys support for partitioned tables
-
- Stalled
-
-
MDEV-16417 Store Foreign Key metadata outside of InnoDB
-
- In Review
-
-
MDEV-20729 Fix REFERENCES constraint in column definition
-
- Closed
-
- causes
-
MDEV-21127 Assertion `(size_t)(ptr - buf) < MAX_TEXT - 4' failed in key_text::key_text
-
- Closed
-
-
MDEV-22817 InnoDB: Failing assertion: idlen <= MAX_TABLE_NAME_LEN upon long partition name with innodb_file_per_table OFF
-
- Closed
-
-
MDEV-26439 Typo in Foreign Key error message
-
- Closed
-
-
MDEV-26824 Can't add foreign key with empty referenced columns list
-
- Closed
-
- relates to
-
MDEV-21690 LeakSanitizer: detected memory leaks in mem_heap_create_block_func
-
- Closed
-
-
MDEV-22230 Unexpected ER_ERROR_ON_RENAME upon DROP non-existing FOREIGN KEY with ALGORITHM=COPY
-
- Closed
-
-
MDEV-35916 REFERENCES clause fails to infer multiple column names
-
- Open
-
-
MDEV-29092 FOREIGN_KEY_CHECKS does not prevent non-copy alter from creating invalid FK structure
-
- Closed
-
This additional subtask requires several days to finish as it is required to keep in sync referenced TABLE_SHARE objects (TABLE_SHARE::referenced_keys list) after DROP TABLE, ALTER ADD/DROP FOREIGN KEY, RENAME TABLE. It was expected to be a subtask of MDEV-16417, but I already started it here and implemented a draft for RENAME TABLE: https://github.com/MariaDB/server/commit/abcce38a623d86bdd9e27cfd0b04ae9698cfef0b
And the above fix should be remade for avoiding TABLE_SHARE invalidation.
MDEV-20865 will track further progress.
P.S. Actually this big enough subtask took more than several days.