[wp-trac] [WordPress Trac] #31625: Function register_uninstall_hook doesn't have a method to remove the outdated data

WordPress Trac noreply at wordpress.org
Fri Mar 13 13:49:49 UTC 2015


#31625: Function register_uninstall_hook doesn't have a method to remove the
outdated data
--------------------------+-----------------------------
 Reporter:  voron_eril    |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Plugins       |    Version:  4.1.1
 Severity:  normal        |   Keywords:
  Focuses:  performance   |
--------------------------+-----------------------------
 Function register_uninstall_hook doesn't have a method to remove the
 outdated data. Here's a problem that I faced recently:
 Subheading plugin used register_uninstall_hook to register its uninstaller
 in the old versions. But in new version register_uninstall_hook call was
 removed and uninstall.php was added.
 And the plugin file was renamed from index.php to subheading.php.
 As a result this is what I get in a serialized array:


 {{{
   ["subheading/index.php"]=>
   array(2) {  [0]=>  object(__PHP_Incomplete_Class)#242 (5) {
 }}}

 The digit after {{{ __PHP_Incomplete_Class }}} is always different, so on
 every update_option call Wordpress lauches MySQL
 {{{
 "UPDATE `wp_options` SET `option_value` = 'a:8:{i:0;b:0;s:33 ".
 }}}

 But because writing to a field locks a table row, this causes the
 situation when server in fact can process only one visitor at a time.

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


More information about the wp-trac mailing list