Miscellaneous profiling fixes
[lhc/web/wiklou.git] / includes / db / DatabaseMysql.php
index b509302..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;
        }