[wp-trac] [WordPress Trac] #24641: Wp Upgrade, Improve populate_options() function

WordPress Trac noreply at wordpress.org
Tue Jun 25 13:36:51 UTC 2013


#24641: Wp Upgrade, Improve populate_options() function
-----------------------------+-----------------------------
 Reporter:  twisted1919      |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  Awaiting Review
Component:  Upgrade/Install  |    Version:  3.5.2
 Severity:  major            |   Keywords:
-----------------------------+-----------------------------
 Today i tried to update one wp installation having 1.5 million records in
 the options table. Needless to say that the current {{{ populate_options()
 }}} implementation is not ready to do this kind of upgrade.
 The issue is that the {{{ populate_options() }}} issues a sql query that
 asks for the entire table to be read in memory:
 {{{ $existing_options = $wpdb->get_col("SELECT option_name FROM
 $wpdb->options"); }}}

 I had to allocate 3 GB of memory and set the time limit to 0 in order to
 make through the upgrade process.

 Please make sure the {{{ populate_options() }}} can handle such high
 number of options to upgrade.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24641>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list