[wpmu-trac] [WordPress MU Trac] #833: Site upgrade can be very inefficient and even fail if WPMU has a lot of tables

WordPress MU Trac wpmu-trac at lists.automattic.com
Mon Jan 5 05:32:40 GMT 2009


#833: Site upgrade can be very inefficient and even fail if WPMU has a lot of
tables
------------------------+---------------------------------------------------
 Reporter:  kingler     |       Owner:  somebody
     Type:  defect      |      Status:  new     
 Priority:  highest     |   Milestone:          
Component:  component1  |     Version:          
 Severity:  critical    |    Keywords:          
------------------------+---------------------------------------------------
 In wp-admin/includes/upgrade.php (trunk rev 1589)

 There is a check in dbDelta() function:

 if($tables = $wpdb->get_col('SHOW TABLES;')) {

 In WPMU, with a lot of tables, this query should be modified to improve
 efficiency.

 An easy solution, change the line to:

  if($tables = $wpdb->get_col('SHOW TABLES like "'.$wpdb->prefix.'";'))

 This is important fix, as it can make the upgrade process fail entirely,
 if you have a large number of tables.

-- 
Ticket URL: <http://trac.mu.wordpress.org/ticket/833>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser


More information about the wpmu-trac mailing list