From ef44f4308edbcd97d6e53d211716fa2dfa143c26 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 23 Dec 2015 17:11:24 -0800 Subject: [PATCH] Upgrade mismatched commit() warnings to exceptions I saw no WMF logs for these in the last 7 days. Change-Id: I725535925ba3fc68cee485767f18937fb8f239bf --- 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 bd1e3753e6..ef4a7b74a2 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -2654,7 +2654,10 @@ abstract class DatabaseBase implements IDatabase { if ( !$this->mTrxLevel ) { return; // nothing to do } elseif ( !$this->mTrxAutomatic ) { - wfWarn( "$fname: Flushing an explicit transaction, getting out of sync!" ); + throw new DBUnexpectedError( + $this, + "$fname: Flushing an explicit transaction, getting out of sync!" + ); } } else { if ( !$this->mTrxLevel ) { -- 2.20.1