Merge "Database: Remove unused errorCount() method"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 18 Sep 2015 09:10:27 +0000 (09:10 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 18 Sep 2015 09:10:27 +0000 (09:10 +0000)
RELEASE-NOTES-1.26
includes/db/Database.php
includes/db/DatabaseOracle.php

index 4463c78..13239de 100644 (file)
@@ -187,6 +187,7 @@ changes to languages because of Phabricator reports.
 * 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).
 
 == Compatibility ==
 
index 4d1b1c0..4ceebaf 100644 (file)
@@ -58,7 +58,6 @@ abstract class DatabaseBase implements IDatabase {
        protected $mSchema;
        protected $mFlags;
        protected $mForeign;
-       protected $mErrorCount = 0;
        protected $mLBInfo = array();
        protected $mDefaultBigSelects = null;
        protected $mSchemaVars = false;
@@ -259,15 +258,6 @@ abstract class DatabaseBase implements IDatabase {
                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.
@@ -1111,8 +1101,6 @@ abstract class DatabaseBase implements IDatabase {
         * @throws DBQueryError
         */
        public function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = false ) {
-               ++$this->mErrorCount;
-
                if ( $this->ignoreErrors() || $tempIgnore ) {
                        wfDebug( "SQL ERROR (ignored): $error\n" );
                } else {
index 081174a..87c3164 100644 (file)
@@ -971,20 +971,6 @@ class DatabaseOracle extends DatabaseBase {
                return $valuedata;
        }
 
-       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
         */