From: Tim Starling Date: Tue, 3 Feb 2009 02:07:00 +0000 (+0000) Subject: * Support for the "blobs table" LB config parameter X-Git-Tag: 1.31.0-rc.0~43061 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22auteur_infos%22%2C%20%22id_auteur=%24id%22%29%20.%20%22?a=commitdiff_plain;h=9388f9fb5d8b9a62d53ce31dce1f5a1f90024daa;p=lhc%2Fweb%2Fwiklou.git * Support for the "blobs table" LB config parameter * Don't redefine the constructor --- diff --git a/maintenance/storage/trackBlobs.php b/maintenance/storage/trackBlobs.php index b13faa003a..0f25fb9497 100644 --- a/maintenance/storage/trackBlobs.php +++ b/maintenance/storage/trackBlobs.php @@ -11,7 +11,7 @@ if ( count( $args ) < 1 ) { exit( 1 ); } $tracker = new TrackBlobs( $args ); -$tracker->trackBlobs(); +$tracker->run(); class TrackBlobs { var $clusters, $textClause; @@ -33,7 +33,7 @@ class TrackBlobs { } } - function trackBlobs() { + function run() { $this->initTrackingTable(); $this->trackRevisions(); $this->trackOrphanText(); @@ -259,14 +259,18 @@ class TrackBlobs { } continue; } + $table = $extDB->getLBInfo( 'blobs table' ); + if ( is_null( $table ) ) { + $table = 'blobs'; + } $startId = 0; $batchesDone = 0; $actualBlobs = gmp_init( 0 ); - $endId = $extDB->selectField( 'blobs', 'MAX(blob_id)', false, __METHOD__ ); + $endId = $extDB->selectField( $table, 'MAX(blob_id)', false, __METHOD__ ); // Build a bitmap of actual blob rows while ( true ) { - $res = $extDB->select( 'blobs', + $res = $extDB->select( $table, array( 'blob_id' ), array( 'blob_id > ' . $extDB->addQuotes( $startId ) ), __METHOD__,