Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Add query filter when searching for a table #2886

Merged
merged 2 commits into from Jul 22, 2020

Conversation

pkelbert
Copy link
Contributor

This change adds a filter to queries SHOW TABLES on function Installer::maybe_create_table(). The queries are used intending to check if a table exists. It's faster to search only for the given name than to search among all database tables.

Fixes #2885

@pkelbert pkelbert requested a review from a team as a code owner July 18, 2020 01:54
@pkelbert pkelbert requested review from Aljullu and removed request for a team July 18, 2020 01:54
Copy link
Contributor

@nerrad nerrad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull! I can confirm this works as expected and will create the table if it doesn't exist. I also did a bit of investigation to confirm this query structure works across the MySQL versions we support.

@nerrad nerrad merged commit 6717319 into woocommerce:main Jul 22, 2020
@Aljullu Aljullu modified the milestones: 3.2.0, 3.1.0 Jul 28, 2020
@Aljullu Aljullu mentioned this pull request Jul 29, 2020
20 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slow query on large network
4 participants