mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Optimize site query when performing network database upgrades
We only use `blog_id` from the query, so we don't need a wildcard. props marcosf Fixes #30097 Built from https://develop.svn.wordpress.org/trunk@30029 git-svn-id: http://core.svn.wordpress.org/trunk@30029 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1c9bc93735
commit
aa469e2623
@ -52,7 +52,7 @@ switch ( $action ) {
|
||||
update_site_option( 'wpmu_upgrade_site', $wp_db_version );
|
||||
}
|
||||
|
||||
$blogs = $wpdb->get_results( "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' AND spam = '0' AND deleted = '0' AND archived = '0' ORDER BY registered DESC LIMIT {$n}, 5", ARRAY_A );
|
||||
$blogs = $wpdb->get_results( "SELECT blog_id FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' AND spam = '0' AND deleted = '0' AND archived = '0' ORDER BY registered DESC LIMIT {$n}, 5", ARRAY_A );
|
||||
if ( empty( $blogs ) ) {
|
||||
echo '<p>' . __( 'All done!' ) . '</p>';
|
||||
break;
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.1-alpha-30028';
|
||||
$wp_version = '4.1-alpha-30029';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user