Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#24641 closed defect (bug) (duplicate)

Wp Upgrade, Improve populate_options() function

Reported by: twisted1919's profile twisted1919 Owned by:
Milestone: Priority: normal
Severity: major Version: 3.5.2
Component: Upgrade/Install Keywords:
Focuses: Cc:

Description

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.

Change History (1)

#1 @SergeyBiryukov
11 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #24620.

Note: See TracTickets for help on using tickets.