Changeset 32380 for branches/4.2/src/wp-admin/includes/upgrade.php
- Timestamp:
- 05/06/2015 07:41:55 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.2/src/wp-admin/includes/upgrade.php
r32367 r32380 1593 1593 $wpdb->query( "ALTER TABLE $wpdb->site DROP INDEX domain, ADD INDEX domain(domain(140),path(51))" ); 1594 1594 $wpdb->query( "ALTER TABLE $wpdb->sitemeta DROP INDEX meta_key, ADD INDEX meta_key(meta_key(191))" ); 1595 $wpdb->query( "ALTER TABLE $wpdb->signups DROP INDEX domain , ADD INDEX domain(domain(140),path(51))" );1595 $wpdb->query( "ALTER TABLE $wpdb->signups DROP INDEX domain_path, ADD INDEX domain_path(domain(140),path(51))" ); 1596 1596 1597 1597 $tables = $wpdb->tables( 'global' ); … … 1599 1599 foreach ( $tables as $table ) { 1600 1600 maybe_convert_table_to_utf8mb4( $table ); 1601 } 1602 } 1603 } 1604 1605 // 4.2.2 1606 if ( $wp_current_db_version < 31535 && 'utf8mb4' === $wpdb->charset ) { 1607 if ( ! ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) && DO_NOT_UPGRADE_GLOBAL_TABLES ) ) { 1608 $upgrade = false; 1609 $indexes = $wpdb->get_results( "SHOW INDEXES FROM $wpdb->signups" ); 1610 foreach( $indexes as $index ) { 1611 if ( 'domain_path' == $index->Key_name && 'domain' == $index->Column_name && 140 != $index->Sub_part ) { 1612 $upgrade = true; 1613 break; 1614 } 1615 } 1616 1617 if ( $upgrade ) { 1618 $wpdb->query( "ALTER TABLE $wpdb->signups DROP INDEX domain_path, ADD INDEX domain_path(domain(140),path(51))" ); 1601 1619 } 1602 1620 }
Note: See TracChangeset
for help on using the changeset viewer.