[wp-trac] [WordPress Trac] #57012: WP_Query caching discards `posts_fields` and `posts_clauses['fields']` filters.

WordPress Trac noreply at wordpress.org
Fri Nov 11 20:35:47 UTC 2022


#57012: WP_Query caching discards `posts_fields` and `posts_clauses['fields']`
filters.
-------------------------------------------------+-------------------------
 Reporter:  peterwilsoncc                        |       Owner:
                                                 |  peterwilsoncc
     Type:  defect (bug)                         |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.1.1
Component:  Query                                |     Version:  6.1
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests commit      |     Focuses:
  fixed-major                                    |  performance
-------------------------------------------------+-------------------------
Changes (by SergeyBiryukov):

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


Comment:

 After [54768], seeing some test failures on MariaDB due to indeterminate
 sort order, see these test runs for example:

 * [https://make.wordpress.org/hosting/test-
 results/r54824/greengeeksbot-r54824/ greengeeksbot-r54824]
 * [https://make.wordpress.org/hosting/test-results/r54824/kdawsbot-r54824/
 kdawsbot-r54824]
 * [https://make.wordpress.org/hosting/test-
 results/r54824/tuonettibot-r54824/ tuonettibot-r54824]
 * [https://make.wordpress.org/hosting/test-
 results/r54815/wpmudevbot-r54815/ wpmudevbot-r54815]

 I can also reproduce these failures locally with MariaDB 10.6.8.

 [attachment:"57012.diff"] aims to stabilize the tests by using
 `assertEqualSets()` instead of `assertEquals()`, since testing the order
 is out of their scope. Includes removing `array_unshift()` and
 `array_reverse()` calls as no longer needed.

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


More information about the wp-trac mailing list