Changeset 33059 for branches/4.2/src/wp-admin/includes/upgrade.php
- Timestamp:
- 07/03/2015 05:58:20 AM (9 years ago)
- Location:
- branches/4.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.2
-
branches/4.2/src/wp-admin/includes/upgrade.php
r32853 r33059 1434 1434 } else { 1435 1435 $tables = $wpdb->tables( 'all' ); 1436 if ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) { 1437 $global_tables = $wpdb->tables( 'global' ); 1438 $tables = array_diff_assoc( $tables, $global_tables ); 1439 } 1436 1440 } 1437 1441 … … 1597 1601 // 4.2 1598 1602 if ( $wp_current_db_version < 31351 && $wpdb->charset === 'utf8mb4' ) { 1599 if ( ! ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) && DO_NOT_UPGRADE_GLOBAL_TABLES) ) {1603 if ( ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) { 1600 1604 $wpdb->query( "ALTER TABLE $wpdb->usermeta DROP INDEX meta_key, ADD INDEX meta_key(meta_key(191))" ); 1601 1605 $wpdb->query( "ALTER TABLE $wpdb->site DROP INDEX domain, ADD INDEX domain(domain(140),path(51))" ); … … 1613 1617 // 4.2.2 1614 1618 if ( $wp_current_db_version < 31535 && 'utf8mb4' === $wpdb->charset ) { 1615 if ( ! ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) && DO_NOT_UPGRADE_GLOBAL_TABLES) ) {1619 if ( ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) { 1616 1620 $upgrade = false; 1617 1621 $indexes = $wpdb->get_results( "SHOW INDEXES FROM $wpdb->signups" ); … … 2460 2464 // Upgrade versions prior to 4.2. 2461 2465 if ( $wp_current_db_version < 31351 ) { 2462 if ( ! is_multisite() ) {2466 if ( ! is_multisite() && ! defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) { 2463 2467 $wpdb->query( "ALTER TABLE $wpdb->usermeta DROP INDEX meta_key, ADD INDEX meta_key(meta_key(191))" ); 2464 2468 }
Note: See TracChangeset
for help on using the changeset viewer.