Index: wp-includes/query.php
===================================================================
--- wp-includes/query.php	(revision 25633)
+++ wp-includes/query.php	(working copy)
@@ -2758,6 +2758,7 @@
 			if ( is_user_logged_in() ) {
 				// Add private states that are limited to viewing by the author of a post or someone who has caps to read private states.
 				$private_states = get_post_stati( array('private' => true) );
+				$user_id = get_current_user_id();
 				foreach ( (array) $private_states as $state )
 					$where .= current_user_can( $read_private_cap ) ? " OR $wpdb->posts.post_status = '$state'" : " OR $wpdb->posts.post_author = $user_id AND $wpdb->posts.post_status = '$state'";
 			}
