[MDEV-31313] SYSTEM VERSIONING and FOREIGN KEY CASCADE create orphan rows on replica Created: 2023-05-19 Updated: 2023-09-11 Resolved: 2023-07-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Replication, Versioned Tables |
| Affects Version/s: | 10.4, 10.6.11, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11 |
| Fix Version/s: | 10.4.31, 10.5.22, 10.6.15, 10.9.8, 10.11.5, 11.0.3, 11.1.2, 11.2.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Andrea Ponzo | Assignee: | Aleksey Midenkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | replication | ||
| Description |
|
Having parent table and child table WITH SYSTEM VERSIONING where there is a Foreign Key CASCADE on child one will generate orphans rows on replica. Steps to reproduce:
MASTER (correct behavior):
REPLICA( wrong behavior on child table):
and now we have orphan row on replica:
on master binlog we can see that only the row on 'andre_main' table is moved to historical data:
|
| Comments |
| Comment by Alice Sherepa [ 2023-05-19 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
Thank you for the report! I repeated as described on 10.4-11.0:
| |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Aleksey Midenkov [ 2023-07-18 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
Please review bb-10.4-midenok | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Nikita Malyavin [ 2023-07-19 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
7bd7bd116 and fb79f477 are good to push after squash | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Aleksey Midenkov [ 2023-07-20 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
10.4.31 10.5.22 10.6.15 10.9.8 10.10.6 10.11.5 11.0.3 11.1.2 11.2.1 |