mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
Upgrades: When converting to utf8mb4
, we were trying to change the wrong index on wp_signups
, causing the conversion to later fail.
Merge [32378] to the 4.2 branch. Props kovshenin, pento. Fixes #32099. Built from https://develop.svn.wordpress.org/branches/4.2@32380 git-svn-id: http://core.svn.wordpress.org/branches/4.2@32350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5d957b7c84
commit
5c01870b62
@ -1592,7 +1592,7 @@ function upgrade_network() {
|
|||||||
$wpdb->query( "ALTER TABLE $wpdb->usermeta DROP INDEX meta_key, ADD INDEX meta_key(meta_key(191))" );
|
$wpdb->query( "ALTER TABLE $wpdb->usermeta DROP INDEX meta_key, ADD INDEX meta_key(meta_key(191))" );
|
||||||
$wpdb->query( "ALTER TABLE $wpdb->site DROP INDEX domain, ADD INDEX domain(domain(140),path(51))" );
|
$wpdb->query( "ALTER TABLE $wpdb->site DROP INDEX domain, ADD INDEX domain(domain(140),path(51))" );
|
||||||
$wpdb->query( "ALTER TABLE $wpdb->sitemeta DROP INDEX meta_key, ADD INDEX meta_key(meta_key(191))" );
|
$wpdb->query( "ALTER TABLE $wpdb->sitemeta DROP INDEX meta_key, ADD INDEX meta_key(meta_key(191))" );
|
||||||
$wpdb->query( "ALTER TABLE $wpdb->signups DROP INDEX domain, ADD INDEX domain(domain(140),path(51))" );
|
$wpdb->query( "ALTER TABLE $wpdb->signups DROP INDEX domain_path, ADD INDEX domain_path(domain(140),path(51))" );
|
||||||
|
|
||||||
$tables = $wpdb->tables( 'global' );
|
$tables = $wpdb->tables( 'global' );
|
||||||
|
|
||||||
@ -1601,6 +1601,24 @@ function upgrade_network() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 4.2.2
|
||||||
|
if ( $wp_current_db_version < 31535 && 'utf8mb4' === $wpdb->charset ) {
|
||||||
|
if ( ! ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) && DO_NOT_UPGRADE_GLOBAL_TABLES ) ) {
|
||||||
|
$upgrade = false;
|
||||||
|
$indexes = $wpdb->get_results( "SHOW INDEXES FROM $wpdb->signups" );
|
||||||
|
foreach( $indexes as $index ) {
|
||||||
|
if ( 'domain_path' == $index->Key_name && 'domain' == $index->Column_name && 140 != $index->Sub_part ) {
|
||||||
|
$upgrade = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( $upgrade ) {
|
||||||
|
$wpdb->query( "ALTER TABLE $wpdb->signups DROP INDEX domain_path, ADD INDEX domain_path(domain(140),path(51))" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -11,7 +11,7 @@ $wp_version = '4.2.1';
|
|||||||
*
|
*
|
||||||
* @global int $wp_db_version
|
* @global int $wp_db_version
|
||||||
*/
|
*/
|
||||||
$wp_db_version = 31534;
|
$wp_db_version = 31535;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the TinyMCE version
|
* Holds the TinyMCE version
|
||||||
|
Loading…
x
Reference in New Issue
Block a user