Moved begin() since the lock() function may cause a BEGIN.
Change-Id: Ib5f7d6b7464a27d08de12c63495374319ac09dfe
This commit is contained in:
parent
a6f899964c
commit
480ead91e6
1 changed files with 2 additions and 3 deletions
|
|
@ -286,6 +286,8 @@ class SiteStatsUpdate implements DeferrableUpdate {
|
|||
$this->doUpdatePendingDeltas();
|
||||
} else {
|
||||
$dbw = wfGetDB( DB_MASTER );
|
||||
// Need a separate transaction because this a global lock
|
||||
$dbw->begin( __METHOD__ );
|
||||
|
||||
$lockKey = wfMemcKey( 'site_stats' ); // prepend wiki ID
|
||||
if ( $rate ) {
|
||||
|
|
@ -306,9 +308,6 @@ class SiteStatsUpdate implements DeferrableUpdate {
|
|||
$this->images += ( $pd['ss_images']['+'] - $pd['ss_images']['-'] );
|
||||
}
|
||||
|
||||
// Need a separate transaction because this a global lock
|
||||
$dbw->begin( __METHOD__ );
|
||||
|
||||
// Build up an SQL query of deltas and apply them...
|
||||
$updates = '';
|
||||
$this->appendUpdate( $updates, 'ss_total_views', $this->views );
|
||||
|
|
|
|||
Loading…
Reference in a new issue