Changeset 31358 for trunk/src/wp-admin/includes/upgrade.php
- Timestamp:
- 02/06/2015 01:40:17 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/upgrade.php
r31354 r31358 1531 1531 if ( $wp_current_db_version < 31351 && $wpdb->charset === 'utf8mb4' ) { 1532 1532 if ( ! ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) && DO_NOT_UPGRADE_GLOBAL_TABLES ) ) { 1533 $wpdb->query( "ALTER TABLE $wpdb->usermeta DROP INDEX meta_key, ADD INDEX meta_key(meta_key(191))" ); 1533 1534 $wpdb->query( "ALTER TABLE $wpdb->site DROP INDEX domain, ADD INDEX domain(domain(140),path(51))" ); 1534 1535 $wpdb->query( "ALTER TABLE $wpdb->sitemeta DROP INDEX meta_key, ADD INDEX meta_key(meta_key(191))" ); … … 2357 2358 // Upgrade versions prior to 4.2. 2358 2359 if ( $wp_current_db_version < 31351 ) { 2359 // So that we can change tables to utf8mb4, we need to shorten the index lengths to less than 767 bytes 2360 $wpdb->query( "ALTER TABLE $wpdb->usermeta DROP INDEX meta_key, ADD INDEX meta_key(meta_key(191))" ); 2360 if ( ! is_multisite() ) { 2361 $wpdb->query( "ALTER TABLE $wpdb->usermeta DROP INDEX meta_key, ADD INDEX meta_key(meta_key(191))" ); 2362 } 2361 2363 $wpdb->query( "ALTER TABLE $wpdb->terms DROP INDEX slug, ADD INDEX slug(slug(191))" ); 2362 2364 $wpdb->query( "ALTER TABLE $wpdb->terms DROP INDEX name, ADD INDEX name(name(191))" );
Note: See TracChangeset
for help on using the changeset viewer.