Index: trunk/phase3/includes/Article.php |
— | — | @@ -4420,12 +4420,8 @@ |
4421 | 4421 | */ |
4422 | 4422 | public function updateCategoryCounts( $added, $deleted ) { |
4423 | 4423 | $ns = $this->mTitle->getNamespace(); |
| 4424 | + $dbw = wfGetDB( DB_MASTER ); |
4424 | 4425 | |
4425 | | - // https://bugzilla.wikimedia.org/show_bug.cgi?id=13921 |
4426 | | - // Create and use a new loadBalancer object, to prevent "1205: Lock wait timeout exceeded;" |
4427 | | - $lb = wfGetLBFactory()->newMainLB(); |
4428 | | - $dbw = $lb->getConnection( DB_MASTER ); |
4429 | | - |
4430 | 4426 | # First make sure the rows exist. If one of the "deleted" ones didn't |
4431 | 4427 | # exist, we might legitimately not create it, but it's simpler to just |
4432 | 4428 | # create it and then give it a negative value, since the value is bogus |
— | — | @@ -4476,9 +4472,6 @@ |
4477 | 4473 | __METHOD__ |
4478 | 4474 | ); |
4479 | 4475 | } |
4480 | | - |
4481 | | - $lb->commitMasterChanges(); |
4482 | | - $lb->closeAll(); |
4483 | 4476 | } |
4484 | 4477 | |
4485 | 4478 | /** |
Index: trunk/phase3/includes/filerepo/LocalFile.php |
— | — | @@ -1508,13 +1508,9 @@ |
1509 | 1509 | } |
1510 | 1510 | |
1511 | 1511 | function doDBDeletes() { |
| 1512 | + $dbw = $this->file->repo->getMasterDB(); |
1512 | 1513 | list( $oldRels, $deleteCurrent ) = $this->getOldRels(); |
1513 | 1514 | |
1514 | | - // https://bugzilla.wikimedia.org/show_bug.cgi?id=13921 |
1515 | | - // Create and use a new loadBalancer object, to prevent "1205: Lock wait timeout exceeded;" |
1516 | | - $lb = wfGetLBFactory()->newMainLB(); |
1517 | | - $dbw = $lb->getConnection( DB_MASTER ); |
1518 | | - |
1519 | 1515 | if ( count( $oldRels ) ) { |
1520 | 1516 | $dbw->delete( 'oldimage', |
1521 | 1517 | array( |
— | — | @@ -1526,9 +1522,6 @@ |
1527 | 1523 | if ( $deleteCurrent ) { |
1528 | 1524 | $dbw->delete( 'image', array( 'img_name' => $this->file->getName() ), __METHOD__ ); |
1529 | 1525 | } |
1530 | | - |
1531 | | - $lb->commitMasterChanges(); |
1532 | | - $lb->closeAll(); |
1533 | 1526 | } |
1534 | 1527 | |
1535 | 1528 | /** |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -238,7 +238,6 @@ |
239 | 239 | * (bug 28485) Block::purgeExpired Database returned error "1205: Lock wait timeout |
240 | 240 | exceeded;" |
241 | 241 | * (bug 27639) Transaction timeout when trying to OldLocalFile::upgradeRow() |
242 | | -* (bug 13921) deadlocks mass-deleting media files in categories |
243 | 242 | |
244 | 243 | === API changes in 1.18 === |
245 | 244 | * (bug 26339) Throw warning when truncating an overlarge API result |