Merge "reinstating Change Ifb1f6125..."
[lhc/web/wiklou.git] / includes / db / Database.php
index a942afe..48aac9d 100644 (file)
@@ -2992,6 +2992,12 @@ abstract class DatabaseBase implements DatabaseType {
                        } elseif( $this->mTrxAutomatic ) {
                                wfWarn( "$fname: Explicit commit of implicit transaction. Something may be out of sync!" );
                        }
+               } else {
+                       if ( !$this->mTrxLevel ) {
+                               return; // nothing to do
+                       } elseif( !$this->mTrxAutomatic ) {
+                               wfWarn( "$fname: Flushing an explicit transaction, getting out of sync!" );
+                       }
                }
 
                $this->doCommit( $fname );