Set split_the_query to false if more than 500 rows requested. Props SergeyBiryukov. fixes #20628

git-svn-id: http://core.svn.wordpress.org/trunk@20756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2012-05-09 17:20:22 +00:00
parent 8c2cc130f6
commit 97aff78b06

View File

@ -2626,7 +2626,8 @@ class WP_Query {
return $r;
}
$split_the_query = apply_filters( 'split_the_query', ( $old_request == $this->request && "$wpdb->posts.*" == $fields && !empty( $limits) ), $this );
$split_the_query = ( $old_request == $this->request && "$wpdb->posts.*" == $fields && !empty( $limits ) && $q['posts_per_page'] < 500 );
$split_the_query = apply_filters( 'split_the_query', $split_the_query, $this );
if ( $split_the_query ) {
// First get the IDs and then fill in the objects