Opened 13 years ago
Closed 13 years ago
#20628 closed defect (bug) (fixed)
Splitting the main query can result in long query strings that segfault
Reported by: | ryan | Owned by: | ryan |
---|---|---|---|
Milestone: | 3.4 | Priority: | normal |
Severity: | normal | Version: | 3.4 |
Component: | Query | Keywords: | |
Focuses: | Cc: |
Description
When paging hierarchical post types, edit.php via wp_edit_posts_query() can create very long query strings that enumerate every post ID to fetch. If a limit is not present or very large, the query may beed to fallback to the old single query style.
See #20621
Attachments (3)
Change History (12)
#1
@
13 years ago
Looks good. Should probably also pick an arbitrary limit like 500 at which point we no longer try to split the query.
#4
@
13 years ago
+1 for 'split_the_query'.
Still need to check the limit if anyone cares to patch that.
I already see !empty( $limits )
in there, so what's left?
#5
@
13 years ago
Oh, to not split the query if 'posts_per_page' => 500+? I don't know, that seems an unlikely edge case.
#6
follow-up:
↓ 7
@
13 years ago
You usually either want paging (i.e a reasonable number), or you don't. Plus, it can be handled with 'split_the_query'.
#7
in reply to:
↑ 6
@
13 years ago
Replying to scribu:
You usually either want paging (i.e a reasonable number), or you don't. Plus, it can be handled with 'split_the_query'.
While it *can* be handled with split the query, surely we've all seen posts_per_page = 99999 before — we should try to catch this by default.
split_the_query filter. Don't split if no limit.