[wp-trac] [WordPress Trac] #26394: In update_option if option is missing add the option with autoload no

WordPress Trac noreply at wordpress.org
Thu Mar 5 16:29:18 UTC 2015


#26394: In update_option if option is missing add the option with autoload no
--------------------------------+------------------------------
 Reporter:  codix               |       Owner:
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Options, Meta APIs  |     Version:  3.7
 Severity:  normal              |  Resolution:
 Keywords:  has-patch           |     Focuses:  performance
--------------------------------+------------------------------
Changes (by MikeHansenMe):

 * keywords:  needs-patch => has-patch


Comment:

 [attachment: 26394.4.diff] changes the tests to check query count.
 autoload = 'yes' increments by 1 because of query:

 SELECT option_name, option_value FROM wptests_options WHERE autoload =
 'yes'

 the additional query from the autoload = 'no' test is

 SELECT option_value FROM wptests_options WHERE option_name =
 'test_update_option_default' LIMIT 1

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


More information about the wp-trac mailing list