From cbb1c5fcefdc6078c92ec040d4addfee70a1bc07 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 16 Sep 2014 17:20:23 -0700 Subject: [PATCH] Made the DB profiler use startAtomic() Change-Id: I6eadd071c16781b320d0c8c518e6184a4c38d874 --- includes/profiler/ProfilerSimpleDB.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/profiler/ProfilerSimpleDB.php b/includes/profiler/ProfilerSimpleDB.php index 38a6436f9d..7ef0ad05c5 100644 --- a/includes/profiler/ProfilerSimpleDB.php +++ b/includes/profiler/ProfilerSimpleDB.php @@ -58,7 +58,7 @@ class ProfilerSimpleDB extends ProfilerStandard { $dbw = wfGetDB( DB_MASTER ); $useTrx = ( $dbw->getType() === 'sqlite' ); // much faster if ( $useTrx ) { - $dbw->begin(); + $dbw->startAtomic( __METHOD__ ); } foreach ( $this->mCollated as $name => $data ) { $eventCount = $data['count']; @@ -103,7 +103,7 @@ class ProfilerSimpleDB extends ProfilerStandard { // "pf_time=pf_time + VALUES(pf_time)"; } if ( $useTrx ) { - $dbw->commit(); + $dbw->endAtomic( __METHOD__ ); } } catch ( DBError $e ) { } -- 2.20.1