Index: ../Sites/wordpress-trunk/wp-includes/post.php
===================================================================
--- ../Sites/wordpress-trunk/wp-includes/post.php	(revision 13885)
+++ ../Sites/wordpress-trunk/wp-includes/post.php	(working copy)
@@ -1650,11 +1650,13 @@
 	// Point all attachments to this post up one level
 	$wpdb->update( $wpdb->posts, $parent_data, $parent_where + array( 'post_type' => 'attachment' ) );
 
-	$comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = %d", $postid ));
+	$comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT comment_ID FROM $wpdb->comments WHERE comment_post_ID = %d", $post->post_parent ));
 	if ( ! empty($comment_ids) ) {
 		do_action( 'delete_comment', $comment_ids );
-		$in_comment_ids = "'" . implode("', '", $comment_ids) . "'";
-		$wpdb->query( "DELETE FROM $wpdb->comments WHERE comment_ID IN($in_comment_ids)" );
+		foreach ( $comment_ids as $comment_id ) {
+			$force_delete_comment = true;
+			wp_delete_comment( $comment_id, $force_delete_comment );
+		}
 		do_action( 'deleted_comment', $comment_ids );
 	}
 
