Index: trunk/phase3/maintenance/storage/trackBlobs.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | exit( 1 ); |
13 | 13 | } |
14 | 14 | $tracker = new TrackBlobs( $args ); |
15 | | -$tracker->trackBlobs(); |
| 15 | +$tracker->run(); |
16 | 16 | |
17 | 17 | class TrackBlobs { |
18 | 18 | var $clusters, $textClause; |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | } |
35 | 35 | } |
36 | 36 | |
37 | | - function trackBlobs() { |
| 37 | + function run() { |
38 | 38 | $this->initTrackingTable(); |
39 | 39 | $this->trackRevisions(); |
40 | 40 | $this->trackOrphanText(); |
— | — | @@ -259,14 +259,18 @@ |
260 | 260 | } |
261 | 261 | continue; |
262 | 262 | } |
| 263 | + $table = $extDB->getLBInfo( 'blobs table' ); |
| 264 | + if ( is_null( $table ) ) { |
| 265 | + $table = 'blobs'; |
| 266 | + } |
263 | 267 | $startId = 0; |
264 | 268 | $batchesDone = 0; |
265 | 269 | $actualBlobs = gmp_init( 0 ); |
266 | | - $endId = $extDB->selectField( 'blobs', 'MAX(blob_id)', false, __METHOD__ ); |
| 270 | + $endId = $extDB->selectField( $table, 'MAX(blob_id)', false, __METHOD__ ); |
267 | 271 | |
268 | 272 | // Build a bitmap of actual blob rows |
269 | 273 | while ( true ) { |
270 | | - $res = $extDB->select( 'blobs', |
| 274 | + $res = $extDB->select( $table, |
271 | 275 | array( 'blob_id' ), |
272 | 276 | array( 'blob_id > ' . $extDB->addQuotes( $startId ) ), |
273 | 277 | __METHOD__, |