[HyperDB] dbDeltas with HyperDB

Chris Morrell chris at cmorrell.com
Wed Oct 19 17:23:35 UTC 2011


Hey everyone,

I'm having an issue with HyperDB and the dbDelta function.  dbDelta runs the
following code:

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

And then loops through the results.  Well, this can be a real issue with
sharding, where each table can be located on a different database server.
 It seems to me that the only way to solve this problem would be to patch
Wordpress core (have dbDelta check each table's existence individually) and
also patch HyperDB to properly parse the table name from the individual SHOW
TABLES query.  There's an existing core
ticket<http://core.trac.wordpress.org/ticket/17998>that begins to
address a similar issue, but it won't work with HyperDB.

Right now I'm just trying to figure out how to approach the issue.  It seems
like it would affect just about any plugin that uses dbDelta to upgrade
their database tables.  Has anyone else run into this problem?  Any good
solutions?

Thanks!
  <http://cmorrell.com/> *Chris Morrell*  Web: http://cmorrell.com  Twitter:
@inxilpro <http://twitter.com/inxilpro>


More information about the HyperDB mailing list