maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #04991
Re: Triangular FKs - Cascade delete leaves DB in state with broken referential integrity
On 03/02/18 12:59, Oliver Schonrock wrote:
> After recent upgrade from 10.1 to 10.2.12,
> we promptly got broken FKs. (I have not yet retested with 10.1).
So, I have just done the test with 10.1, and can confirm that 10.1 DOES
NOT exhibit this broken behaviour. Of course there was switch from
Percona XtraDB to InnoDB engine between 10.1 and 10.2...
Proof:
Server version: 10.1.30-MariaDB
SELECT * FROM member;
+----+--------------------+-----------------+
| id | default_address_id | default_card_id |
+----+--------------------+-----------------+
| 1 | 2 | 3 |
+----+--------------------+-----------------+
SELECT * FROM address;
+----+-----------+
| id | member_id |
+----+-----------+
| 2 | 1 |
+----+-----------+
SELECT * FROM payment_method;
+----+-----------+-----------------------+
| id | member_id | cardholder_address_id |
+----+-----------+-----------------------+
| 3 | 1 | 2 |
+----+-----------+-----------------------+
DELETE FROM member WHERE id = 1;
SELECT * FROM member;
[ empty ]
SELECT * FROM address;
[ empty ]
SELECT * FROM payment_method;
[ empty ]
All gone, as they should be.
Next steps? Is this a bug report for 10.2 with the InnoDB engine?
--
Oliver Schönrock
Attachment:
signature.asc
Description: OpenPGP digital signature
Follow ups
References