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

WordPress Trac noreply at wordpress.org
Thu Jul 7 14:26:22 UTC 2016

#37184: Stop FOUND_ROWS running in comment query is cached
 Reporter:  spacedmonkey                |       Owner:  boonebgorges
     Type:  defect (bug)                |      Status:  closed
 Priority:  high                        |   Milestone:  4.6
Component:  Comments                    |     Version:  4.4
 Severity:  normal                      |  Resolution:  fixed
 Keywords:  has-patch needs-unit-tests  |     Focuses:
Changes (by boonebgorges):

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


 In [changeset:"38001"]:
 #!CommitTicketReference repository="" revision="38001"
 Comments: Cache results of `SELECT FOUND_ROWS()` query.

 When comment IDs are fetched from the cache rather than the database,
 the subsequent `SELECT FOUND_ROWS()` query will not return the correct
 To avoid unnecessary queries, we cache the results of the `found_comments`
 query alongside the comment IDs.

 Props spacedmonkey.
 Fixes #37184.

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

More information about the wp-trac mailing list