Also removed the protected $mErrorCount property used by this method.
Also removed DatabaseOracle::reportQueryError(). After removing its use
of $mErrorCount and applying relevant changes from
419221e4a71b ("Fixed
bug where catching DB errors left ignoreErrors() on"), the only effect
would be that, like for the other DB types, query errors would be
logged using wfLogDBError().
Change-Id: Ie26a5f5ef7dc5619d9db38d3eb6b7af3e6592aff
* Watchlist tokens, SpecialResetTokens, and User::getTokenFromOption()
are deprecated. Applications using those can work via the OAuth
extension instead. New tokens types should not be added.
* Watchlist tokens, SpecialResetTokens, and User::getTokenFromOption()
are deprecated. Applications using those can work via the OAuth
extension instead. New tokens types should not be added.
+* DatabaseBase::errorCount() was removed (unused).
protected $mSchema;
protected $mFlags;
protected $mForeign;
protected $mSchema;
protected $mFlags;
protected $mForeign;
- protected $mErrorCount = 0;
protected $mLBInfo = array();
protected $mDefaultBigSelects = null;
protected $mSchemaVars = false;
protected $mLBInfo = array();
protected $mDefaultBigSelects = null;
protected $mSchemaVars = false;
return $this->mTrxLevel ? $this->mTrxTimestamp : null;
}
return $this->mTrxLevel ? $this->mTrxTimestamp : null;
}
- /**
- * Get/set the number of errors logged. Only useful when errors are ignored
- * @param int $count The count to set, or omitted to leave it unchanged.
- * @return int The error count
- */
- public function errorCount( $count = null ) {
- return wfSetVar( $this->mErrorCount, $count );
- }
-
/**
* Get/set the table prefix.
* @param string $prefix The table prefix to set, or omitted to leave it unchanged.
/**
* Get/set the table prefix.
* @param string $prefix The table prefix to set, or omitted to leave it unchanged.
* @throws DBQueryError
*/
public function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = false ) {
* @throws DBQueryError
*/
public function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = false ) {
- ++$this->mErrorCount;
-
if ( $this->ignoreErrors() || $tempIgnore ) {
wfDebug( "SQL ERROR (ignored): $error\n" );
} else {
if ( $this->ignoreErrors() || $tempIgnore ) {
wfDebug( "SQL ERROR (ignored): $error\n" );
} else {
- function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = false ) {
- # Ignore errors during error handling to avoid infinite
- # recursion
- $ignore = $this->ignoreErrors( true );
- ++$this->mErrorCount;
-
- if ( $ignore || $tempIgnore ) {
- wfDebug( "SQL ERROR (ignored): $error\n" );
- $this->ignoreErrors( $ignore );
- } else {
- throw new DBQueryError( $this, $error, $errno, $sql, $fname );
- }
- }
-
/**
* @return string Wikitext of a link to the server software's web site
*/
/**
* @return string Wikitext of a link to the server software's web site
*/