[wp-trac] [WordPress Trac] #17998: New Site & Upgrade process uses unrestricted "show all" causing timeouts
WordPress Trac
wp-trac at lists.automattic.com
Wed Oct 19 17:46:36 UTC 2011
#17998: New Site & Upgrade process uses unrestricted "show all" causing timeouts
--------------------------+------------------
Reporter: brianlayman | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.3
Component: Database | Version: 3.2
Severity: major | Resolution:
Keywords: has-patch |
--------------------------+------------------
Comment (by andy):
Why does dbDelta bother with SHOW TABLES at all? Why not just loop
over the table names and do DESCRIBE TABLE on each one?
{{{
foreach ( $cqueries as $table => $qry ) {
$tablefields = $wpdb->get_results( "DESCRIBE $table" );
if ( $tablefields ) {
// Generate ALTER TABLE statements
} else {
// Use CREATE TABLE statement
}
}
}}}
Related:
http://lists.automattic.com/pipermail/hyperdb/2011-October/000228.html
http://lists.automattic.com/pipermail/hyperdb/2011-October/000229.html
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17998#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list