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

Change subject: Schema is not PostgreSQL connection parameter
......................................................................


Schema is not PostgreSQL connection parameter

Temporary fix for bug 70030.

openConnectionWithParams() got a new schema
parameter in 30a82aae9cf and therefore must
not be used to probe some available databases
when checking username/password, because
schema is not at all a PostgreSQL connection
parameter - it something similar to
"current directory" in the database. PostgreSQL
can additionally search additional schemas
for objects in necessary.

This whole openPgConnection logic needs some
deeper repair; for now however, let's quickly
fix bug 70030 which is caused by that fact
that openConnectionWithParams returns magic
"Status" object and no longer a DatabasePostgres
instance we can directly talk to.

As a result, openPgConnection( "create-db" )
was returning a Status object that had
another Status object embedded in the value
field.

This reverts partially commit 30a82aae9cf7e5536eef761637a1277b7c18017e.

Conflicts:
        includes/installer/Installer.php
        includes/installer/PostgresInstaller.php
        maintenance/install.php

Bug: 70030
Change-Id: I61d5f262e60722bc08201b40b61a298d8af42223
---
M includes/installer/PostgresInstaller.php
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Tim Landscheidt: Looks good to me, but someone else must approve
  Jjanes: Looks good to me, but someone else must approve
  Petrb: Looks good to me, but someone else must approve
  MarkAHershberger: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/installer/PostgresInstaller.php 
b/includes/installer/PostgresInstaller.php
index 6dcce23..c30a989 100644
--- a/includes/installer/PostgresInstaller.php
+++ b/includes/installer/PostgresInstaller.php
@@ -262,11 +262,11 @@
                $status = Status::newGood();
                foreach ( $dbs as $db ) {
                        try {
-                               $conn = $this->openConnectionWithParams(
+                               $conn = new DatabasePostgres(
+                                       $this->getVar( 'wgDBserver' ),
                                        $user,
                                        $password,
-                                       $db,
-                                       $this->getVar( 'wgDBmwschema' ) );
+                                       $db );
                        } catch ( DBConnectionError $error ) {
                                $conn = false;
                                $status->fatal( 'config-pg-test-error', $db,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I61d5f262e60722bc08201b40b61a298d8af42223
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: saper <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Jjanes <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: MarkAHershberger <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: Petrb <[email protected]>
Gerrit-Reviewer: Skizzerz <[email protected]>
Gerrit-Reviewer: Tim Landscheidt <[email protected]>
Gerrit-Reviewer: Waldir <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
Gerrit-Reviewer: saper <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to