Make WordPress Core


Ignore:
Timestamp:
07/09/2013 07:14:33 PM (11 years ago)
Author:
nacin
Message:

In populate_options(), only query the option names we are checking against. No need to load the entire table into memory. props leewillis77. fixes #24620.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/schema.php

    r24381 r24614  
    495495    $fat_options = array( 'moderation_keys', 'recently_edited', 'blacklist_keys', 'uninstall_plugins' );
    496496
    497     $existing_options = $wpdb->get_col("SELECT option_name FROM $wpdb->options");
     497    $keys = "'" . implode( "', '", array_keys( $options ) ) . "'";
     498    $existing_options = $wpdb->get_col( "SELECT option_name FROM $wpdb->options WHERE option_name in ( $keys )" );
    498499
    499500    $insert = '';
Note: See TracChangeset for help on using the changeset viewer.