Skip to:
Content

bbPress.org

Opened 11 years ago

Closed 11 years ago

#2554 closed enhancement (fixed)

Use `meta_type` argument in meta queries

Reported by: johnjamesjacoby's profile johnjamesjacoby Owned by: johnjamesjacoby's profile 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_typeargument 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)

2554-register_views.diff (753 bytes) - added by netweb 11 years ago.

Download all attachments as: .zip

Change History (11)

#1 @johnjamesjacoby
11 years ago

In 5297:

Add meta_type hinting to widget queries. See #2554.

#2 @johnjamesjacoby
11 years ago

In 5298:

Add meta_type hinting to topics queries. See #2554.

#3 @johnjamesjacoby
11 years ago

In 5299:

Add meta_type hinting to bbp_update_forum_last_topic_id(). See #2554.

#4 @johnjamesjacoby
11 years ago

In 5300:

Add meta_type hinting to admin queries. See #2554.

#5 @johnjamesjacoby
11 years ago

In 5301:

Add meta_type hinting to bbp_move_reply_handler(). See #2554.

#6 @johnjamesjacoby
11 years ago

In 5302:

Add meta_type to extra page template: page-topics-no-replies.php. See #2554.

#7 @johnjamesjacoby
11 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Meta type hints are all done. Closing as fixed.

#8 @netweb
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/


In 2554-register_views.diff:

Add meta_type hinting to register_views().

This ticket was mentioned in IRC in #bbpress-dev by netweb. View the logs.


11 years ago

#10 @johnjamesjacoby
11 years ago

  • Owner set to johnjamesjacoby
  • Resolution set to fixed
  • Status changed from reopened to closed

In 5322:

Add NUMERIC type hinting to view queries. Props netweb. Fixes #2554.

Note: See TracTickets for help on using tickets.