Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi guys,
I had an error when updating the database about the files timestamp index creation failing. So I checked the code really quick and I found this:
1) You call the same function twice with the exact same parameters
2) You use the MySQL incompatible command: "SHOW INDEX FROM ...", which means PostgreSQL people will get an error, although minor (i.e. it just says it cannot create the index and moves on.)
_boost_index_exists($ret, 'node_revisions', 'timestamp');
_boost_index_exists($ret, 'files', 'timestamp');
_boost_index_exists($ret, 'comments', 'timestamp');
_boost_index_exists($ret, 'node', 'changed');
_boost_index_exists($ret, 'files', 'timestamp');
_boost_index_exists($ret, 'node_comment_statistics', 'last_comment_timestamp');
_boost_index_exists($ret, 'votingapi_vote', 'timestamp');
Thank you.
Alexis Wilke
Comment | File | Size | Author |
---|---|---|---|
#7 | boost-637002.patch | 1.51 KB | mikeytown2 |
#3 | boost-637002.patch | 1.28 KB | mikeytown2 |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedCan I get the output of this sql command from you?
Comment #2
AlexisWilke CreditAttribution: AlexisWilke commentedYou will get this:
So if you get indexname I guess you'd get what you need. 8-)
Thank you.
Alexis
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedThis was useful
http://api.drupal.org/api/global/db_type/6
let me know if this patch works for you
Comment #4
AlexisWilke CreditAttribution: AlexisWilke commentedI will test later, but a quick look, I think that the name will be psql (as the extension to the file) and not postgresql. My idea... 8-}
More soon.
Alexis Wilke
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commentedi think it's pgsql
http://api.drupal.org/api/function/drupal_detect_database_types
committed with pgsql
Comment #6
AlexisWilke CreditAttribution: AlexisWilke commentedExcellent. 8-)
Comment #7
mikeytown2 CreditAttribution: mikeytown2 commentedforgot to remove the extra call to the files table; doesn't do much since that index won't be created unless the index doesn't exist.
Comment #8
AlexisWilke CreditAttribution: AlexisWilke commentedPerfection looks good 8-)
Good patch.
Thank you.
Alexis
Comment #9
mikeytown2 CreditAttribution: mikeytown2 commentedcommitted