WordPress.org

Make WordPress Core

Ticket #18315: patch.diff

File patch.diff, 720 bytes (added by alexkingorg, 10 years ago)

Add an index to guid column during upgrade

  • wp-admin/includes/upgrade.php

     
    451451        if ( $wp_current_db_version < 15260 )
    452452                upgrade_300();
    453453
     454        if ( $wp_current_db_version < 18227 )
     455                upgrade_322();
     456
    454457        maybe_disable_automattic_widgets();
    455458
    456459        update_option( 'db_version', $wp_db_version );
     
    11471150}
    11481151
    11491152/**
     1153 * Execute changes made in WordPress 3.2.2.
     1154 *
     1155 * @since 3.2.2
     1156 */
     1157function upgrade_322() {
     1158        global $wpdb;
     1159
     1160        // add index to GUID column
     1161        add_clean_index( $wpdb->posts, 'guid' );
     1162}
     1163
     1164/**
    11501165 * Execute network level changes
    11511166 *
    11521167 * @since 3.0.0