[wp-trac] [WordPress Trac] #37696: WP_Comment_Query loses sql_clauses with Object Cache

WordPress Trac noreply at wordpress.org
Tue Aug 30 14:48:01 UTC 2016


#37696: WP_Comment_Query loses sql_clauses with Object Cache
--------------------------+---------------------------
 Reporter:  Rarst         |       Owner:  boonebgorges
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.6.1
Component:  Comments      |     Version:  4.6
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
--------------------------+---------------------------
Changes (by boonebgorges):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"38446"]:
 {{{
 #!CommitTicketReference repository="" revision="38446"
 Comments: Don't do direct SQL query when fetching decendants.

 The SQL query was built using the clauses compiled when querying for
 top-level comments. But in cases where the top-level comment query
 results are already in the cache, the SQL clauses are not built, and
 so are unavailable for `fill_descendants()`. Instead, we call
 `get_comments()`, using modified versions of the parameters passed
 to the main `WP_Comment_Query` class.

 Props Akeif, Rarst for testing.
 Fixes #37696.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37696#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list