Upgrade premature implicit transaction commits to exceptions
DBO_TRX transactions for the web request are now enforced. WMF logs for implicit commit warnings are now silent after the last round of patches. Change-Id: If91633d192bfd9e137f8f868230d5040dea0ad45
This commit is contained in:
parent
277a233fc6
commit
820f5d6ce5
1 changed files with 5 additions and 5 deletions
|
|
@ -2642,13 +2642,13 @@ abstract class DatabaseBase implements IDatabase {
|
|||
"$fname: Transaction already in progress (from {$this->mTrxFname}), " .
|
||||
" performing implicit commit!"
|
||||
);
|
||||
} else {
|
||||
} elseif ( $this->mTrxDoneWrites ) {
|
||||
// The transaction was automatic and has done write operations
|
||||
if ( $this->mTrxDoneWrites ) {
|
||||
wfLogDBError( "$fname: Automatic transaction with writes in progress" .
|
||||
throw new DBUnexpectedError(
|
||||
$this,
|
||||
"$fname: Automatic transaction with writes in progress" .
|
||||
" (from {$this->mTrxFname}), performing implicit commit!\n"
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
$this->runOnTransactionPreCommitCallbacks();
|
||||
|
|
|
|||
Loading…
Reference in a new issue