[wp-trac] [WordPress Trac] #37184: Stop FOUND_ROWS running in comment query is cached

WordPress Trac noreply at wordpress.org
Sun Jun 26 13:25:16 UTC 2016


#37184: Stop FOUND_ROWS running in comment query is cached
--------------------------+-----------------------------
 Reporter:  spacedmonkey  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 In #36906 the comment group was made to be a persistent object cache
 group. This means that comment queries using wp_comment_query are now
 cached. However, if query is cached and the no_found_rows param is set to
 true, the SELECT FOUND_ROWS() query still runs. This query will return the
 incorrect value as the comment query with SQL_CALC_FOUND_ROWS will not
 have run. Likely the found rows will fall back to the main query on the
 page, giving the incorrect value of found comments. Found comments will be
 used for pagination of multi page comments, and it will only show the
 first page of comments.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37184>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list