phpMyAdmin supports custom relations between rows as stored in pma__relation
table. The GUI calls them internal relationships
. If the tables are of MyISAM, the operations tab shows a Check referential integrity
section. If the tables are InnoDB, the operations tab does not contain a Check referential integrity
section.
relation_test.table1
.Structure
in the top navigation.Relation view
.Internal relationships
and add a relation for table2_id
to relation_test.table2.table2_id
.relation_test.table1
.Operations
.Check referential integrity
section is shown.table1
from InnoDB
to MyISAM
.Check referential integrity
section is shown.Note: Clicking the links does not properly work right now due to #14598.
I expect the Check referential integrity
section to be shown even when using InnoDB as table engine.
InnoDB foreign keys come at a performance cost. But InnoDB supports transactions. So in order to use transaction, I am using InnoDB without foreign keys. But I like to configure relations in phpMyAdmin to be able to easily navigate around.
Hi @aschuch247 I fixed #14598 and opened #15517
@lem9 Made the choice to not show for InnoDB 16 years ago, so I think the choice can be re-evaluated
I'm pretty sure that the decision was made 16 years ago because phpMyAdmin did not allow internal relations for InnoDB types. It didn't make sense to run the referential integrity at the time on an InnoDB table. The ability to add internal relations on other table types was added a few years ago and I feel this change, while beneficial, was completely overlooked at the time. I agree about fixing this.
This works for me in phpMyAdmin 4.9.2. Thank you!
Most helpful comment
I'm pretty sure that the decision was made 16 years ago because phpMyAdmin did not allow internal relations for InnoDB types. It didn't make sense to run the referential integrity at the time on an InnoDB table. The ability to add internal relations on other table types was added a few years ago and I feel this change, while beneficial, was completely overlooked at the time. I agree about fixing this.