Upgrade mismatched commit() warnings to exceptions
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 24 Dec 2015 01:11:24 +0000 (17:11 -0800)
committerOri.livneh <ori@wikimedia.org>
Fri, 12 Feb 2016 21:32:00 +0000 (21:32 +0000)
I saw no WMF logs for these in the last 7 days.

Change-Id: I725535925ba3fc68cee485767f18937fb8f239bf

includes/db/Database.php

index bd1e375..ef4a7b7 100644 (file)
@@ -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 ) {