[MDEV-27276] CREATE TABLE with FOREIGN KEY constraint fails to apply in parallel Created: 2021-12-15  Updated: 2021-12-20  Resolved: 2021-12-20

Status: Closed
Project: MariaDB Server
Component/s: Galera
Affects Version/s: 10.4
Fix Version/s: 10.4.23, 10.5.14, 10.6.6, 10.7.2

Type: Bug Priority: Major
Reporter: Seppo Jaakola Assignee: Jan Lindström (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-26931 Deadlock between ALTER on parent and ... Open

 Description   

This issue was observed when testing the fix for MDEV-26803. There, in the test galera.galera_fk_cascade_delete, scenario 2, if the applier thread count in node 2 is raised to 2, before the test tables are created, it often happens that the table 'c' create applies in parallel with one of the 'p1' table inserts , and this fails with assertion.
Reason for this appears to be that create table with FK constraints does not append the referenced table names as keys in the write set.



 Comments   
Comment by Marko Mäkelä [ 2021-12-16 ]

In 10.6 and later, see also MDEV-26931. Because of MDEV-21175 and MDEV-24258, starting with the 10.6 series, InnoDB must solely rely on metadata locks or table locks (MDEV-26554) with regard to FOREIGN KEY constraints.

Comment by Seppo Jaakola [ 2021-12-20 ]

PR was submitted in github

Generated at Thu Feb 08 09:51:41 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.