From a2242913b2e27e46f616b8885102d4bf1b8583f2 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 10 Aug 2016 20:16:12 -0700 Subject: [PATCH] Upgrade unmatched explicit commit() of DBO_TRX to an exception Follows-up f8d5075656 and 820f5d6ce5. This mostly for sanity, as normally the exception would happen on begin(). Change-Id: I2c2fb20ed5184d3c00d3050e929a11e3e37f50f4 --- includes/db/Database.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/db/Database.php b/includes/db/Database.php index ba25183e46..c591f3ce4b 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -2718,7 +2718,10 @@ abstract class DatabaseBase implements IDatabase { wfWarn( "$fname: No transaction to commit, something got out of sync!" ); return; // nothing to do } elseif ( $this->mTrxAutomatic ) { - wfWarn( "$fname: Explicit commit of implicit transaction. Something may be out of sync!" ); + throw new DBUnexpectedError( + $this, + "$fname: Explicit commit of implicit transaction." + ); } } -- 2.20.1