-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Replace usage of "information_schema.tables" with "SHOW TABLES LIKE" #30745
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
Conversation
This db table is used to check if the product attributes lookup table exists, but that makes WooCommerce uninstallable in WP.COM without a patch. This commit replaces that usage with a "SHOW TABLES LIKE" statement, which is also consistent with other parts of the code.
|
@Konamiman could you boil down the testing instructions a little bit? This PR says to follow the testing instructions of #30041, which says to follow the testing instructions of #29190. I just want to make sure I'm understanding the expectations correctly. Here's how I understand things, correct me if my understanding is off:
Is my understanding correct? |
|
Sorry, yes, I was a bit lazy on this one. Your assumptions on expectations
are pretty much spot on, but more precisely, for the tools page:
I'f the table exists: you should see two entries, "Regenerate" and "Delete".
I'd the table doesn't exist: there's one single entry, "Create".
El mar., 21 sept. 2021 17:37, jonathansadowski ***@***.***>
escribió:
… @Konamiman <https://github.com/Konamiman> could you boil down the testing
instructions a little bit? This PR says to follow the testing instructions
of #30041 <#30041>, which
says to follow the testing instructions of #29190
<#29190>. I just want to
make sure I'm understanding the expectations correctly.
Here's how I understand things, correct me if my understanding is off:
- Settings > Products > Advanced should exist when the table exists
(and should be missing when it is missing)
- "Regenerate the product attributes lookup table" should appear in Status
> Tools when the table exists (and should be missing when it is
missing)
Is my understanding correct?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#30745 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHE5623MYJR7FOH4DRHP7DUDCREXANCNFSM5EN7DCRQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
|
Awesome, thanks for clarifying! |
|
Hi @jonathansadowski, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:
|
All Submissions:
Changes proposed in this Pull Request:
#30041 introduced a
check_lookup_table_existsmethod that accesses theinformation_schema.tablestable in order to check if the lookup table exists. However it looks like this is causing issues in WPCOM: an automated code checking script is preventing Woo from being installed for this reason.This pull request changes the mechanism for checking if the table exists to a
SHOW TABLES LIKE, which is consistent with how database table existence is checked in other places of the codebase.How to test the changes in this Pull Request:
Follow the testing instructions of #30041. Specifically, check that the options shown in the tools page and in Settings > Products > Advanced is consistent with the table existing or not.
Other information:
Changelog entry
FOR PR REVIEWER ONLY: