[wp-trac] [WordPress Trac] #22192: update_metadata() and update_option() strict checks can cause false negatives

WordPress Trac noreply at wordpress.org
Tue Aug 13 09:53:37 UTC 2013


#22192: update_metadata() and update_option() strict checks can cause false
negatives
------------------------------------------+-----------------------------
 Reporter:  nacin                         |       Owner:
     Type:  defect (bug)                  |      Status:  new
 Priority:  normal                        |   Milestone:  Future Release
Component:  Performance                   |     Version:
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |
------------------------------------------+-----------------------------

Comment (by duck_):

 Replying to [comment:3 atimmer]:
 > [http://core.trac.wordpress.org/attachment/ticket/22192/22192.1.diff
 22192.1.diff] adds a test to test for the amount of queries executed after
 adding a meta values and right after updating it with the same value.

 Thanks for the tests :) A few notes though:

  * These tests shouldn't be in `Tests_Meta_Query` they belong more to
 `Tests_Meta` in tests/meta.php
  * Can we use the `num_queries` property of `$wpdb`? If not then the
 reference to `$wpdb` should disappear.
  * Debug cruft left-over in `query_counter()`. (Though the entire function
 might go per bullet above)

--
Ticket URL: <http://core.trac.wordpress.org/ticket/22192#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list