WordPress.org

Make WordPress Core

Changeset 34978


Ignore:
Timestamp:
10/09/2015 02:06:15 AM (4 years ago)
Author:
SergeyBiryukov
Message:

After [34529], if a compatible termmeta table is found on database upgrade, convert it to utf8mb4 collation.

Props dboulet.
Fixes #34224.

Location:
trunk/src
Files:
2 edited

Legend:

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

    r34912 r34978  
    26312631
    26322632    // Upgrade versions prior to 4.4.
    2633     if ( $wp_current_db_version < 34370 ) {
    2634         // If compatible termmeta table is found, use it, but enforce a proper index.
     2633    if ( $wp_current_db_version < 34978 ) {
     2634        // If compatible termmeta table is found, use it, but enforce a proper index and update collation.
    26352635        if ( $wpdb->get_var( "SHOW TABLES LIKE '{$wpdb->termmeta}'" ) && $wpdb->get_results( "SHOW INDEX FROM {$wpdb->termmeta} WHERE Column_name = 'meta_key'" ) ) {
    26362636            $wpdb->query( "ALTER TABLE $wpdb->termmeta DROP INDEX meta_key, ADD INDEX meta_key(meta_key(191))" );
     2637            maybe_convert_table_to_utf8mb4( $wpdb->termmeta );
    26372638        }
    26382639    }
  • trunk/src/wp-includes/version.php

    r34937 r34978  
    1212 * @global int $wp_db_version
    1313 */
    14 $wp_db_version = 34903;
     14$wp_db_version = 34978;
    1515
    1616/**
Note: See TracChangeset for help on using the changeset viewer.