jenkins-bot has submitted this change and it was merged.

Change subject: Ensure variables in database classes are defined, used and 
correctly cased
......................................................................


Ensure variables in database classes are defined, used and correctly cased

Change-Id: I12065b2c2bae1c000edac3c92d1db0c03fc40f90
---
M includes/db/Database.php
M includes/db/DatabaseMssql.php
M includes/db/DatabaseSqlite.php
3 files changed, 18 insertions(+), 3 deletions(-)

Approvals:
  Parent5446: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/db/Database.php b/includes/db/Database.php
index 57575ec..24ceb2f 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -1025,6 +1025,8 @@
                        Profiler::instance()->transactionWritingIn( 
$this->mServer, $this->mDBname );
                }
 
+               $queryProf = '';
+               $totalProf = '';
                $isMaster = !is_null( $this->getLBInfo( 'master' ) );
 
                if ( !Profiler::instance()->isStub() ) {
diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php
index ab23cd0..f15092f 100644
--- a/includes/db/DatabaseMssql.php
+++ b/includes/db/DatabaseMssql.php
@@ -166,7 +166,6 @@
         */
        protected function doQuery( $sql ) {
                wfDebug( "SQL: [$sql]\n" );
-               $this->offset = 0;
 
                // several extensions seem to think that all databases support 
limits
                // via LIMIT N after the WHERE clause well, MSSQL uses SELECT 
TOP N,
@@ -1105,11 +1104,11 @@
  * @ingroup Database
  */
 class MssqlField implements Field {
-       private $name, $tablename, $default, $max_length, $nullable, $type;
+       private $name, $tableName, $default, $max_length, $nullable, $type;
 
        function __construct( $info ) {
                $this->name = $info['COLUMN_NAME'];
-               $this->tablename = $info['TABLE_NAME'];
+               $this->tableName = $info['TABLE_NAME'];
                $this->default = $info['COLUMN_DEFAULT'];
                $this->max_length = $info['CHARACTER_MAXIMUM_LENGTH'];
                $this->nullable = !( strtolower( $info['IS_NULLABLE'] ) == 'no' 
);
@@ -1149,6 +1148,18 @@
  * @ingroup Database
  */
 class MssqlResult {
+       /** @var int */
+       private $mCursor;
+
+       /** @var array */
+       private $mRows;
+
+       /** @var bool|int */
+       private $mNumFields;
+
+       /** @var array|bool */
+       private $mFieldMeta;
+
        /**
         * @param bool|resource $queryresult
         */
diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php
index 130d650..1ae2c72 100644
--- a/includes/db/DatabaseSqlite.php
+++ b/includes/db/DatabaseSqlite.php
@@ -124,6 +124,8 @@
         * @return PDO|bool SQL connection or false if failed
         */
        function openFile( $fileName ) {
+               $err = false;
+
                $this->mDatabaseFile = $fileName;
                try {
                        if ( $this->mFlags & DBO_PERSISTENT ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/105722
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I12065b2c2bae1c000edac3c92d1db0c03fc40f90
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand <siebr...@wikimedia.org>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: Parent5446 <tylerro...@gmail.com>
Gerrit-Reviewer: Siebrand <siebr...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to