Opened 11 years ago
Closed 11 years ago
#2554 closed enhancement (fixed)
Use `meta_type` argument in meta queries
Reported by: | johnjamesjacoby | Owned by: | johnjamesjacoby |
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General - Performance | Keywords: | 2nd-opinion |
Cc: |
Description
#WP21621 fixed incorrect type casting of meta queries. Because bbPress (currently) uses meta values and queries for things like freshness, casting to DATETIME
for date queries and NUMERIC
for count/popular queries guarantees accurate results, and comes with a small performance increase as well.
Let's update our queries to add this cast hinting, let it soak in trunk, and see what comes from it.
The main concern I have comes from the additional meta_type
argument possibly interfering with plugins that filter arguments to order by different values. In those cases, it's plausible that we'd be forcing an incorrect type cast to DATETIME
when a filter changed the default query order to NUMERIC
.
Attachments (1)
Change History (11)
#7
@
11 years ago
- Resolution set to fixed
- Status changed from new to closed
Meta type hints are all done. Closing as fixed.
#8
@
11 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
bbPress' registered views slipped past...
Oh bother! No topics were found here!
http://bbpress.org/forums/view/no-replies/ http://buddypress.org/support/view/no-replies/
Add meta_type
hinting to register_views()
.
In 5297: