Changeset 6736

Show
Ignore:
Timestamp:
02/05/08 23:29:59 (7 months ago)
Author:
ryan
Message:

Order by and index on comment_date_gmt instead of comment_date to insulate order from offset changes. fixes #5773

Files:

Legend:

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

    r6732 r6736  
    5454  KEY comment_approved (comment_approved), 
    5555  KEY comment_post_ID (comment_post_ID), 
    56   KEY comment_approved_date (comment_approved,comment_date
     56  KEY comment_approved_date_gmt (comment_approved,comment_date_gmt
    5757) $charset_collate; 
    5858CREATE TABLE $wpdb->links ( 
  • trunk/wp-includes/comment.php

    r6729 r6736  
    208208    switch ( strtolower($timezone)) { 
    209209        case 'gmt': 
    210             $lastcommentmodified = $wpdb->get_var("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date DESC LIMIT 1"); 
     210            $lastcommentmodified = $wpdb->get_var("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1"); 
    211211            break; 
    212212        case 'blog': 
    213             $lastcommentmodified = $wpdb->get_var("SELECT comment_date FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date DESC LIMIT 1"); 
     213            $lastcommentmodified = $wpdb->get_var("SELECT comment_date FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1"); 
    214214            break; 
    215215        case 'server': 
  • trunk/wp-includes/version.php

    r6732 r6736  
    1717 * @global int $wp_db_version 
    1818 */ 
    19 $wp_db_version = 6731
     19$wp_db_version = 6736
    2020 
    2121?>