Merge "Import BatchRowUpdate classes from Echo"
[lhc/web/wiklou.git] / includes / db / Database.php
index d7acb42..aa8e2a0 100644 (file)
@@ -230,7 +230,7 @@ abstract class DatabaseBase implements IDatabase {
         * @param null|bool $ignoreErrors
         * @return bool The previous value of the flag.
         */
-       public function ignoreErrors( $ignoreErrors = null ) {
+       protected function ignoreErrors( $ignoreErrors = null ) {
                return wfSetBit( $this->mFlags, DBO_IGNORE, $ignoreErrors );
        }
 
@@ -3189,6 +3189,17 @@ abstract class DatabaseBase implements IDatabase {
                return false;
        }
 
+       /**
+        * Determines if the given query error was a connection drop
+        * STUB
+        *
+        * @param integer|string $errno
+        * @return bool
+        */
+       public function wasConnectionError( $errno ) {
+               return false;
+       }
+
        /**
         * Perform a deadlock-prone transaction.
         *
@@ -3205,7 +3216,8 @@ abstract class DatabaseBase implements IDatabase {
         * iteration, or false on error, for example if the retry limit was
         * reached.
         *
-        * @return bool
+        * @return mixed
+        * @throws DBQueryError
         */
        public function deadlockLoop() {
                $args = func_get_args();
@@ -3219,6 +3231,7 @@ abstract class DatabaseBase implements IDatabase {
 
                $this->begin( __METHOD__ );
 
+               $retVal = null;
                $e = null;
                do {
                        try {