[wp-trac] [WordPress Trac] #30795: Upgrade bug affecting indexing
WordPress Trac
noreply at wordpress.org
Sat Dec 20 16:29:50 UTC 2014
#30795: Upgrade bug affecting indexing
-----------------------------+-----------------------------
Reporter: MattyRob | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version: 4.1
Severity: normal | Keywords:
Focuses: performance |
-----------------------------+-----------------------------
Every time WordPress is updated I was getting an entry in my error_log as
follows:
WordPress database error Duplicate key name 'type_status_date' for query
ALTER TABLE wp_posts ADD KEY type_status_date
(post_type,post_status,post_date,ID) made by wp_upgrade,
make_db_current_silent, dbDelta
After some heavy back tracking through the code, this is coming from a
mismatch between the reported indexing of my database and what WordPress
is expecting. in particular to the 'post_status' part. It seems WordPress
expects the 'SubPart to be NULL, only in my main site is was '1'.
So, my index was reporting as:
KEY type_status_date (post_type,post_status(1),post_date,ID)
Rather than:
KEY type_status_date (post_type,post_status,post_date,ID)
This means the upgrade code is called on every update and fails on every
update also.
I've managed to force through a fixed on my own site by dropping the index
and recreating it using SQL in PHPMyAdmin.
Googling for the above error message it would seem I'm not the only one
affected.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30795>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list