Merge "Produce monolog messages through kafka+avro"
[lhc/web/wiklou.git] / includes / db / Database.php
index 4d1b1c0..1e54f55 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 {
@@ -3238,9 +3226,6 @@ abstract class DatabaseBase implements IDatabase {
                                $retVal = call_user_func_array( $function, $args );
                                break;
                        } catch ( DBQueryError $e ) {
-                               $error = $this->lastError();
-                               $errno = $this->lastErrno();
-                               $sql = $this->lastQuery();
                                if ( $this->wasDeadlock() ) {
                                        // Retry after a randomized delay
                                        usleep( mt_rand( self::DEADLOCK_DELAY_MIN, self::DEADLOCK_DELAY_MAX ) );