Author Archives: Marko Mäkelä
For historical reasons, the handling of FOREIGN KEY constraints in MariaDB Server is somewhat peculiar. Unlike CHECK constraints, which are being enforced at the query execution layer for all tables, FOREIGN KEY constraint definitions will simply be ignored unless the underlying storage engine supports them.
The storage engine is not only responsible for enforcing referential integrity between tables, but also storing the constraint definitions. Currently, InnoDB is the only storage engine that supports foreign key constraints, between persistent, non-partitioned tables.
Partitioning is implemented by a storage engine wrapper that makes each partition or subpartition appear as a separate table in the underlying storage engine.
…
Continue reading “Per-table unique FOREIGN KEY constraint names – new feature in MariaDB 12.1”