[wp-trac] [WordPress Trac] #31388: Database Error During Upgrade
WordPress Trac
noreply at wordpress.org
Fri May 22 15:30:05 UTC 2015
#31388: Database Error During Upgrade
-----------------------------+-----------------------
Reporter: miqrogroove | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone:
Component: Upgrade/Install | Version:
Severity: blocker | Resolution:
Keywords: | Focuses:
-----------------------------+-----------------------
Changes (by jstensved):
* status: closed => reopened
* resolution: wontfix =>
* severity: normal => blocker
Comment:
I'd like to confirm that this is still an issue. The exact same error
message appears when trying to upgrade a client site to 4.2 and blocks the
whole upgrade process.
{{{
Can't DROP 'slug'; check that column/key exists
}}}
Current db_version is 29630 so when trying to upgrade line 2452 in
upgrade.php below will first remove the index and five rows down run the
DROP followed by ADD INDEX which breaks since the index was just removed.
{{{
if ( $wp_current_db_version < 30133 ) {
// dbDelta() can recreate but can't drop the index.
$wpdb->query( "ALTER TABLE $wpdb->terms DROP INDEX slug"
);
}
// Upgrade versions prior to 4.2.
if ( $wp_current_db_version < 31351 ) {
if ( ! is_multisite() ) {
$wpdb->query( "ALTER TABLE $wpdb->usermeta DROP
INDEX meta_key, ADD INDEX meta_key(meta_key(191))" );
}
$wpdb->query( "ALTER TABLE $wpdb->terms DROP INDEX slug,
ADD INDEX slug(slug(191))" );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31388#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list