Merge "Return correct values and types"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 10 Jan 2014 12:25:23 +0000 (12:25 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 10 Jan 2014 12:25:23 +0000 (12:25 +0000)
includes/db/DatabaseMysqlBase.php
includes/db/DatabaseOracle.php
includes/db/DatabasePostgres.php
includes/db/DatabaseSqlite.php

index 0c2e472..7bf247f 100644 (file)
@@ -1023,7 +1023,8 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
                $newName = $this->addIdentifierQuotes( $newName );
                $oldName = $this->addIdentifierQuotes( $oldName );
                $query = "CREATE $tmp TABLE $newName (LIKE $oldName)";
-               $this->query( $query, $fname );
+
+               return $this->query( $query, $fname );
        }
 
        /**
index bb901b1..b1a8f66 100644 (file)
@@ -723,7 +723,7 @@ class DatabaseOracle extends DatabaseBase {
                        oci_commit( $this->mConn );
                }
 
-               oci_free_statement( $stmt );
+               return oci_free_statement( $stmt );
        }
 
        function insertSelect( $destTable, $srcTable, $varMap, $conds, $fname = __METHOD__,
@@ -1497,7 +1497,7 @@ class DatabaseOracle extends DatabaseBase {
                        oci_commit( $this->mConn );
                }
 
-               oci_free_statement( $stmt );
+               return oci_free_statement( $stmt );
        }
 
        function bitNot( $field ) {
index 3e58c66..9f96ccb 100644 (file)
@@ -381,7 +381,7 @@ class DatabasePostgres extends DatabaseBase {
                global $wgDBport;
 
                if ( !strlen( $user ) ) { # e.g. the class is being loaded
-                       return;
+                       return null;
                }
 
                $this->mServer = $server;
index 6d2693f..5f14aef 100644 (file)
@@ -150,8 +150,10 @@ class DatabaseSqlite extends DatabaseBase {
                        # Enforce LIKE to be case sensitive, just like MySQL
                        $this->query( 'PRAGMA case_sensitive_like = 1' );
 
-                       return true;
+                       return $this->mConn;
                }
+
+               return false;
        }
 
        /**