Make WordPress Core


Ignore:
Timestamp:
07/03/2015 05:43:28 AM (10 years ago)
Author:
dd32
Message:

Don't upgrade global tables to utf8mb4 when wp_should_upgrade_global_tables() says not to.
Additionally fixes an incorrect conditional in [33057] which would result in the usermeta index being altered twice on Multisite updates.

See #32154

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/upgrade.php

    r33057 r33058  
    15151515        } else {
    15161516            $tables = $wpdb->tables( 'all' );
     1517            if ( ! wp_should_upgrade_global_tables() ) {
     1518                $global_tables = $wpdb->tables( 'global' );
     1519                $tables = array_diff_assoc( $tables, $global_tables );
     1520            }
    15171521        }
    15181522   
     
    26352639    // Upgrade versions prior to 4.2.
    26362640    if ( $wp_current_db_version < 31351 ) {
    2637         if ( wp_should_upgrade_global_tables() ) {
     2641        if ( ! is_multisite() && wp_should_upgrade_global_tables() ) {
    26382642            $wpdb->query( "ALTER TABLE $wpdb->usermeta DROP INDEX meta_key, ADD INDEX meta_key(meta_key(191))" );
    26392643        }
     
    27122716
    27132717    /**
    2714      * Filter if upgrade routines should be run on global tables in multisite.
     2718     * Filter if upgrade routines should be run on global tables.
    27152719     *
    27162720     * @param bool $should_upgrade Whether to run the upgrade routines on global tables.
Note: See TracChangeset for help on using the changeset viewer.