WordPress.org

Make WordPress Core

Changeset 19799


Ignore:
Timestamp:
01/31/2012 06:26:07 PM (6 years ago)
Author:
ryan
Message:

Drop the comment_approved index from the comments table. comment_approved_date_gmt is sufficient. fixes #19935

Location:
trunk
Files:
3 edited

Legend:

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

    r19793 r19799  
    104104  user_id bigint(20) unsigned NOT NULL default '0',
    105105  PRIMARY KEY  (comment_ID),
    106   KEY comment_approved (comment_approved),
    107106  KEY comment_post_ID (comment_post_ID),
    108107  KEY comment_approved_date_gmt (comment_approved,comment_date_gmt),
  • trunk/wp-admin/includes/upgrade.php

    r19798 r19799  
    460460        upgrade_330();
    461461
    462     if ( $wp_current_db_version < 19793 )
     462    if ( $wp_current_db_version < 19799 )
    463463        upgrade_340();
    464464
     
    12251225    global $wp_current_db_version, $wpdb;
    12261226
    1227     $wpdb->hide_errors();
    1228     $wpdb->query( "ALTER TABLE $wpdb->options DROP COLUMN blog_id" );
    1229     $wpdb->show_errors();
    1230 }   
    1231    
     1227    if ( $wp_current_db_version < 19798 ) {
     1228        $wpdb->hide_errors();
     1229        $wpdb->query( "ALTER TABLE $wpdb->options DROP COLUMN blog_id" );
     1230        $wpdb->show_errors();
     1231    }
     1232
     1233    if ( $wp_current_db_version < 19799 ) {
     1234        $wpdb->hide_errors();
     1235        $wpdb->query("ALTER TABLE $wpdb->comments DROP INDEX comment_approved");
     1236        $wpdb->show_errors();
     1237    }
     1238}
     1239
    12321240/**
    12331241 * Execute network level changes
  • trunk/wp-includes/version.php

    r19798 r19799  
    1212 * @global int $wp_db_version
    1313 */
    14 $wp_db_version = 19798;
     14$wp_db_version = 19799;
    1515
    1616/**
Note: See TracChangeset for help on using the changeset viewer.