return false;
}
+ public function serverIsReadOnly() {
+ return false;
+ }
+
final public function onTransactionResolution( callable $callback ) {
if ( !$this->mTrxLevel ) {
throw new DBUnexpectedError( $this, "No transaction is active." );
"$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();
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."
+ );
}
}