Skip to:
Content

bbPress.org

Opened 13 years ago

Closed 13 years ago

#2554 closed enhancement (fixed)

Use `meta_type` argument in meta queries

Reported by: johnjamesjacoby Owned by: johnjamesjacoby
Priority: normal Milestone: 2.6
Component: General - Performance Version:
Severity: normal 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 13 years ago.

Download all attachments as: .zip

Change History (11)

#1 @johnjamesjacoby
13 years ago

In 5297:

Add meta_type hinting to widget queries. See #2554.

#2 @johnjamesjacoby
13 years ago

In 5298:

Add meta_type hinting to topics queries. See #2554.

#3 @johnjamesjacoby
13 years ago

In 5299:

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

#4 @johnjamesjacoby
13 years ago

In 5300:

Add meta_type hinting to admin queries. See #2554.

#5 @johnjamesjacoby
13 years ago

In 5301:

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

#6 @johnjamesjacoby
13 years ago

In 5302:

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

#7 @johnjamesjacoby
13 years ago

  • Resolution → fixed
  • Status new → closed

Meta type hints are all done. Closing as fixed.

#8 @netweb
13 years ago

  • Resolution fixed
  • Status closed → 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.


13 years ago

#10 @johnjamesjacoby
13 years ago

  • Owner set to johnjamesjacoby
  • Resolution → fixed
  • Status reopened → closed

In 5322:

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

Note: See TracTickets for help on using tickets.