Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/154721

Change subject: Wrap CentralAuthUser::attach in an explicit transaction
......................................................................

Wrap CentralAuthUser::attach in an explicit transaction

Change-Id: I715c3e2b77ba28efc36a375ee214021f1334a1d1
(cherry picked from commit d36e72a00191bb78dbb4720536772dd4ad949413)
---
M CentralAuthUser.php
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/21/154721/1

diff --git a/CentralAuthUser.php b/CentralAuthUser.php
index 7c14fa8..0d4d395 100644
--- a/CentralAuthUser.php
+++ b/CentralAuthUser.php
@@ -1408,6 +1408,7 @@
         */
        public function attach( $wikiID, $method = 'new', $sendToRC = true ) {
                $dbw = self::getCentralDB();
+               $dbw->begin( __METHOD__ );
                $dbw->insert( 'localuser',
                        array(
                                'lu_wiki'               => $wikiID,
@@ -1418,6 +1419,7 @@
                        array( 'IGNORE' )
                );
                $success = $dbw->affectedRows() === 1;
+               $dbw->commit( __METHOD__ );
 
                if ( $wikiID === wfWikiID() ) {
                        $this->resetState();

-- 
To view, visit https://gerrit.wikimedia.org/r/154721
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I715c3e2b77ba28efc36a375ee214021f1334a1d1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: wmf/1.24wmf16
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to