Index: trunk/phase3/includes/LinksUpdate.php |
— | — | @@ -345,22 +345,15 @@ |
346 | 346 | $where = false; |
347 | 347 | } |
348 | 348 | } |
349 | | - |
350 | | - // Create and use a new loadBalancer object, to prevent "1205: Lock wait timeout exceeded;" |
351 | | - $lb = wfGetLBFactory()->newMainLB(); |
352 | | - $dbw = $lb->getConnection( DB_MASTER ); |
353 | | - |
354 | 349 | if ( $where ) { |
355 | | - $dbw->delete( $table, $where, __METHOD__ ); |
| 350 | + $this->mDb->delete( $table, $where, __METHOD__ ); |
356 | 351 | } |
357 | 352 | if ( count( $insertions ) ) { |
358 | | - $dbw->insert( $table, $insertions, __METHOD__, 'IGNORE' ); |
| 353 | + $this->mDb->insert( $table, $insertions, __METHOD__, 'IGNORE' ); |
359 | 354 | } |
360 | | - |
361 | | - $lb->commitMasterChanges(); |
362 | | - $lb->closeAll(); |
363 | 355 | } |
364 | 356 | |
| 357 | + |
365 | 358 | /** |
366 | 359 | * Get an array of pagelinks insertions for passing to the DB |
367 | 360 | * Skips the titles specified by the 2-D array $existing |