Opened 13 years ago
Closed 13 years ago
#24641 closed defect (bug) (duplicate)
Wp Upgrade, Improve populate_options() function
| Reported by: | twisted1919 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Upgrade/Install | Version: | 3.5.2 |
| Severity: | major | Keywords: | |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Duplicate of #24620.