* @return bool
*/
function deadlockLoop() {
- $myFname = 'DatabaseBase::deadlockLoop';
$this->begin();
$args = func_get_args();
$this->ignoreErrors( $oldIgnore );
if ( $tries <= 0 ) {
- $this->rollback( $myFname );
+ $this->rollback( __METHOD__ );
$this->reportQueryError( $error, $errno, $sql, $fname );
return false;
} else {
- $this->commit( $myFname );
+ $this->commit( __METHOD__ );
return $retVal;
}
}
* zero if we timed out.
*/
function masterPosWait( DBMasterPos $pos, $timeout ) {
- $fname = 'DatabaseBase::masterPosWait';
- wfProfileIn( $fname );
+ wfProfileIn( __METHOD__ );
if ( !is_null( $this->mFakeSlaveLag ) ) {
$wait = intval( ( $pos->pos - microtime( true ) + $this->mFakeSlaveLag ) * 1e6 );
if ( $wait > $timeout * 1e6 ) {
wfDebug( "Fake slave timed out waiting for $pos ($wait us)\n" );
- wfProfileOut( $fname );
+ wfProfileOut( __METHOD__ );
return -1;
} elseif ( $wait > 0 ) {
wfDebug( "Fake slave waiting $wait us\n" );
usleep( $wait );
- wfProfileOut( $fname );
+ wfProfileOut( __METHOD__ );
return 1;
} else {
wfDebug( "Fake slave up to date ($wait us)\n" );
- wfProfileOut( $fname );
+ wfProfileOut( __METHOD__ );
return 0;
}
}
- wfProfileOut( $fname );
+ wfProfileOut( __METHOD__ );
# Real waits are implemented in the subclass.
return 0;