Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check referential integrity' not present for InnoDB tables without foreign key, but with configured phpMyAdmin relation #15477

Closed
aschuch247 opened this issue Sep 26, 2019 · 3 comments
Assignees
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
Milestone

Comments

@aschuch247
Copy link

Describe the bug

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.

To Reproduce

  1. Create two tables using the following queries: relation_test.sql.log
  2. Open relation_test.table1.
  3. Click on Structure in the top navigation.
  4. Click on Relation view.
  5. Open Internal relationships and add a relation for table2_id to relation_test.table2.table2_id.
  6. Open relation_test.table1.
  7. Click on Operations.
  8. No Check referential integrity section is shown.
  9. Change the engine for table1 from InnoDB to MyISAM.
  10. Check referential integrity section is shown.

Note: Clicking the links does not properly work right now due to #14598.

Expected behavior

I expect the Check referential integrity section to be shown even when using InnoDB as table engine.

Server configuration

Additional context

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.

@williamdes williamdes added the Bug A problem or regression with an existing feature label Sep 26, 2019
@williamdes williamdes added this to Needs triage in issues via automation Sep 26, 2019
@williamdes williamdes moved this from Needs triage to to be fixed soon in issues Sep 26, 2019
@williamdes
Copy link
Member

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

@williamdes williamdes added the has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete label Oct 21, 2019
@williamdes williamdes moved this from to be fixed soon to ready to merge in issues Oct 21, 2019
@ibennetch
Copy link
Member

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.

williamdes added a commit that referenced this issue Oct 28, 2019
…tions

Pull-request: #15477

Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit that referenced this issue Oct 28, 2019
@williamdes williamdes moved this from ready to merge to Closed in issues Oct 28, 2019
@williamdes williamdes added this to the 4.9.2 milestone Oct 28, 2019
@williamdes williamdes self-assigned this Oct 28, 2019
@williamdes williamdes changed the title 'Check referential integrity' not present for InnoDB tables without foreign key, but with configured phpMyAdmin relation Check referential integrity' not present for InnoDB tables without foreign key, but with configured phpMyAdmin relation Oct 28, 2019
@aschuch247
Copy link
Author

This works for me in phpMyAdmin 4.9.2. Thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature has-pr An issue that has a pull request pending that may fix this issue. The pull request may be incomplete
Projects
issues
  
Closed
Development

No branches or pull requests

3 participants