Miscellaneous profiling fixes
[lhc/web/wiklou.git] / includes / db / DatabaseMysql.php
index 7f389da..8708608 100644 (file)
@@ -133,7 +133,7 @@ class DatabaseMysql extends DatabaseBase {
                                substr( $password, 0, 3 ) . "..., error: " . $error . "\n" );
 
                        wfProfileOut( __METHOD__ );
-                       $this->reportConnectionError( $error );
+                       return $this->reportConnectionError( $error );
                }
 
                if ( $dbName != '' ) {
@@ -146,7 +146,7 @@ class DatabaseMysql extends DatabaseBase {
                                        "from client host " . wfHostname() . "\n" );
 
                                wfProfileOut( __METHOD__ );
-                               $this->reportConnectionError( "Error selecting database $dbName" );
+                               return $this->reportConnectionError( "Error selecting database $dbName" );
                        }
                }
 
@@ -414,6 +414,7 @@ class DatabaseMysql extends DatabaseBase {
                # http://dev.mysql.com/doc/mysql/en/SHOW_INDEX.html
                $table = $this->tableName( $table );
                $index = $this->indexName( $index );
+
                $sql = 'SHOW INDEX FROM ' . $table;
                $res = $this->query( $sql, $fname );
 
@@ -428,7 +429,6 @@ class DatabaseMysql extends DatabaseBase {
                                $result[] = $row;
                        }
                }
-
                return empty( $result ) ? false : $result;
        }
 
@@ -805,7 +805,8 @@ class DatabaseMysql extends DatabaseBase {
         * @param $delVar string
         * @param $joinVar string
         * @param $conds array|string
-        * @param $fname bool
+        * @param bool|string $fname bool
+        * @throws DBUnexpectedError
         * @return bool|ResultWrapper
         */
        function deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds, $fname = 'DatabaseBase::deleteJoin' ) {
@@ -951,13 +952,6 @@ class DatabaseMysql extends DatabaseBase {
 
 }
 
-/**
- * Legacy support: Database == DatabaseMysql
- *
- * @deprecated in 1.16
- */
-class Database extends DatabaseMysql {}
-
 /**
  * Utility class.
  * @ingroup Database