Made QueryPage use startAtomic() for trx handling
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 17 Sep 2014 00:29:19 +0000 (17:29 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 17 Sep 2014 00:29:19 +0000 (17:29 -0700)
Change-Id: I0a2e8e05c96dbc582ecc045876497737020f441a

includes/specialpage/QueryPage.php

index ae0003d..c54dcc6 100644 (file)
@@ -324,7 +324,7 @@ abstract class QueryPage extends SpecialPage {
                                                        'qc_value' => $value );
                                }
 
-                               $dbw->begin( __METHOD__ );
+                               $dbw->startAtomic( __METHOD__ );
                                # Clear out any old cached data
                                $dbw->delete( 'querycache', array( 'qc_type' => $this->getName() ), $fname );
                                # Save results into the querycache table on the master
@@ -336,7 +336,7 @@ abstract class QueryPage extends SpecialPage {
                                $dbw->insert( 'querycache_info',
                                        array( 'qci_type' => $this->getName(), 'qci_timestamp' => $dbw->timestamp() ),
                                        $fname );
-                               $dbw->commit( __METHOD__ );
+                               $dbw->endAtomic( __METHOD__ );
                        }
                } catch ( DBError $e ) {
                        if ( !$ignoreErrors ) {