Index: wp-includes/functions.php
===================================================================
--- wp-includes/functions.php	(revision 12398)
+++ wp-includes/functions.php	(working copy)
@@ -3511,12 +3511,25 @@
 
 	$delete_timestamp = time() - (60*60*24*EMPTY_TRASH_DAYS);
 
+	$posts_in_trash = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE post_status = 'trash'", ARRAY_A);
+
+	foreach ( (array) $posts_in_trash as $post ) {
+		$in_trash[] = $post['ID'];
+	}
+
+	$wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE post_id NOT IN (%s)", implode( ',', $in_trash ) ) );
 	$posts_to_delete = $wpdb->get_results($wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_wp_trash_meta_time' AND meta_value < '%d'", $delete_timestamp), ARRAY_A);
 
 	foreach ( (array) $posts_to_delete as $post ) {
 		wp_delete_post($post['post_id']);
 	}
 
+	$comments_in_trash = $wpdb->get_results("SELECT comment_ID FROM $wpdb->comments WHERE comment_approved = 'trash'", ARRAY_A);
+	foreach ( (array) $comments_in_trash as $comment ) {
+		$in_trash[] = $comment['comment_ID'];
+	}
+
+	$wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->commentmeta WHERE comment_id NOT IN (%s)", implode( ',', $in_trash ) ) );
 	$comments_to_delete = $wpdb->get_results($wpdb->prepare("SELECT comment_id FROM $wpdb->commentmeta WHERE meta_key = '_wp_trash_meta_time' AND meta_value < '%d'", $delete_timestamp), ARRAY_A);
 
 	foreach ( (array) $comments_to_delete as $comment ) {
