http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94252
Revision: 94252
Author: demon
Date: 2011-08-11 15:29:25 +0000 (Thu, 11 Aug 2011)
Log Message:
-----------
Wrap site_stats update in a begin()/commit() to see if this helps
* For trunk: need rewriting to use $dbw->update()
* More generally: manual site_stats updates suck, we should fix this
Modified Paths:
--------------
branches/wmf/1.17wmf1/includes/filerepo/LocalFile.php
Modified: branches/wmf/1.17wmf1/includes/filerepo/LocalFile.php
===================================================================
--- branches/wmf/1.17wmf1/includes/filerepo/LocalFile.php 2011-08-11
15:24:44 UTC (rev 94251)
+++ branches/wmf/1.17wmf1/includes/filerepo/LocalFile.php 2011-08-11
15:29:25 UTC (rev 94252)
@@ -963,8 +963,10 @@
} else {
# This is a new file
# Update the image count
+ $dbw->begin();
$site_stats = $dbw->tableName( 'site_stats' );
$dbw->query( "UPDATE $site_stats SET
ss_images=ss_images+1", __METHOD__ );
+ $dbw->commit();
}
$descTitle = $this->getTitle();
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs