r102890 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102889‎ | r102890 | r102891 >
Date:12:35, 13 November 2011
Author:aaron
Status:ok (Comments)
Tags:core 
Comment:
Removed transaction in saveOptions(). No reason was given for it and it could break any callers that have transactions.
Modified paths:
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -4107,10 +4107,8 @@
41084108 }
41094109 }
41104110
4111 - $dbw->begin();
41124111 $dbw->delete( 'user_properties', array( 'up_user' => $this->getId() ), __METHOD__ );
41134112 $dbw->insert( 'user_properties', $insert_rows, __METHOD__ );
4114 - $dbw->commit();
41154113 }
41164114
41174115 /**

Comments

#Comment by Hashar (talk | contribs)   11:59, 5 December 2011

I guess the idea is to make sure we do not accidentally delete user options forever when the insert triggers an error.

#Comment by MaxSem (talk | contribs)   14:44, 23 December 2011

Do we have any code paths that update other users' properties? It's a possible cause of insert() failing here.

#Comment by Aaron Schulz (talk | contribs)   23:29, 1 February 2012

Specifically, ConfirmAccount had a problem with this.

Status & tagging log