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
-
Activity
Field | Original Value | New Value |
---|---|---|
Link | This issue blocks MDEV-19191 [ MDEV-19191 ] |
Link | This issue blocks MDEV-12483 [ MDEV-12483 ] |
Link | This issue blocks MDEV-10393 [ MDEV-10393 ] |
Link | This issue blocks MDEV-16417 [ MDEV-16417 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Component/s | Storage Engine - InnoDB [ 10129 ] |
Fix Version/s | 10.5 [ 23123 ] |
Summary | Use SQL parser for FK in InnoDB | Obsolete internal parser for FK in InnoDB |
Labels | RM_105_INNODB |
Link |
This issue blocks |
Assignee | Aleksey Midenkov [ midenok ] | Marko Mäkelä [ marko ] |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
Assignee | Marko Mäkelä [ marko ] | Aleksey Midenkov [ midenok ] |
Assignee | Aleksey Midenkov [ midenok ] | Marko Mäkelä [ marko ] |
Status | Stalled [ 10000 ] | In Review [ 10002 ] |
Assignee | Marko Mäkelä [ marko ] | Aleksey Midenkov [ midenok ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Labels | RM_105_INNODB |
Link | This issue relates to MDEV-20865 [ MDEV-20865 ] |
Link | This issue is blocked by MDEV-20865 [ MDEV-20865 ] |
Link | This issue relates to MDEV-20865 [ MDEV-20865 ] |
Link | This issue is blocked by MDEV-20865 [ MDEV-20865 ] |
Fix Version/s | 10.5.0 [ 23709 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Link |
This issue causes |
Link |
This issue relates to |
Link |
This issue causes |
Link |
This issue causes |
Link |
This issue causes |
Workflow | MariaDB v3 [ 99383 ] | MariaDB v4 [ 134081 ] |
Link |
This issue relates to |
Link |
This issue relates to |
Link | This issue blocks MDEV-19191 [ MDEV-19191 ] |
Link | This issue relates to MDEV-35916 [ MDEV-35916 ] |
I think that as part of this, we should fix the SQL parser (both sql_yacc.yy and sql_yacc_ora.yy) so that also the following form of REFERENCES constraints will be recognized and not ignored by the parser:
column_def:
field_spec
{ $$= $1; }
| field_spec references
{ $$= $1; }
;
Currently, the grammar rule is ignoring the semantic value of the REFERENCES clause. The non-terminal references is being more correctly used in the key_def rule. Also, I wonder whether the second production should include opt_constraint:
column_def:
field_spec
{ $$= $1; }
| field_spec opt_constraint references
{ $$= … $1 … $2 … $3 …; }
;