SpecialContributions: Avoid using 'contributions' slave for getParentLengths
authorSean Pringle <springle@wikimedia.org>
Tue, 14 Jan 2014 03:36:29 +0000 (13:36 +1000)
committerLegoktm <legoktm.wikipedia@gmail.com>
Tue, 14 Jan 2014 03:46:09 +0000 (03:46 +0000)
Bug: 59987
Change-Id: I65d8eb14c7ea17fd732339e2e27a98a95e60cbd3

includes/specials/SpecialContributions.php

index 6b56c2f..0a24661 100644 (file)
@@ -856,7 +856,8 @@ class ContribsPager extends ReverseChronologicalPager {
                                $batch->add( $row->page_namespace, $row->page_title );
                        }
                }
-               $this->mParentLens = Revision::getParentLengths( $this->getDatabase(), $revIds );
+               # Bug 59987: avoid using 'contributions' db connection
+               $this->mParentLens = Revision::getParentLengths( wfGetDB( DB_SLAVE ), $revIds );
                $batch->execute();
                $this->mResult->seek( 0 );
        }