Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 20037)
+++ wp-includes/post.php	(working copy)
@@ -1905,6 +1905,13 @@
  * @return string The SQL AND clause for mime searching.
  */
 function wp_post_mime_type_where($post_mime_types, $table_alias = '') {
+	global $wpdb;
+	
+	//always prefix table names in case a filter added a join
+	// see: #20193
+	if ( $table_alias == '' )
+		$table_alias = $wpdb->posts;
+
 	$where = '';
 	$wildcards = array('', '%', '%/%');
 	if ( is_string($post_mime_types) )
@@ -1932,9 +1939,9 @@
 			return '';
 
 		if ( false !== strpos($mime_pattern, '%') )
-			$wheres[] = empty($table_alias) ? "post_mime_type LIKE '$mime_pattern'" : "$table_alias.post_mime_type LIKE '$mime_pattern'";
+			$wheres[] = "$table_alias.post_mime_type LIKE '$mime_pattern'";
 		else
-			$wheres[] = empty($table_alias) ? "post_mime_type = '$mime_pattern'" : "$table_alias.post_mime_type = '$mime_pattern'";
+			$wheres[] = "$table_alias.post_mime_type = '$mime_pattern'";
 	}
 	if ( !empty($wheres) )
 		$where = ' AND (' . join(' OR ', $wheres) . ') ';