summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2016-07-08 18:59:29 +0200
committerGitHub <noreply@github.com>2016-07-08 18:59:29 +0200
commit5880669daea07f078e2bd9deb6e1a0793f6a929f (patch)
treeb6fb7b30521c69af82f25626ad05f5d35643c8e7 /Bugzilla
parentc0cf9b11fb4a21387126069ff8cd7e3400a8de39 (diff)
downloadbugzilla-5880669daea07f078e2bd9deb6e1a0793f6a929f.tar.gz
bugzilla-5880669daea07f078e2bd9deb6e1a0793f6a929f.tar.xz
Bug 542507 - [PostgreSQL] The db_user sometimes cannot connect to the "template1" database
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/DB.pm1
-rw-r--r--Bugzilla/DB/Pg.pm7
2 files changed, 1 insertions, 7 deletions
diff --git a/Bugzilla/DB.pm b/Bugzilla/DB.pm
index 6832e0ce7..68582305f 100644
--- a/Bugzilla/DB.pm
+++ b/Bugzilla/DB.pm
@@ -247,7 +247,6 @@ sub _get_no_db_connection {
my ($sql_server) = @_;
my $dbh;
my %connect_params = %{ Bugzilla->localconfig };
- $connect_params{db_name} = '';
my $conn_success = eval {
$dbh = _connect(\%connect_params);
};
diff --git a/Bugzilla/DB/Pg.pm b/Bugzilla/DB/Pg.pm
index 9ef7f77f1..ed1a4aa7d 100644
--- a/Bugzilla/DB/Pg.pm
+++ b/Bugzilla/DB/Pg.pm
@@ -36,14 +36,9 @@ use constant BLOB_TYPE => { pg_type => DBD::Pg::PG_BYTEA };
sub new {
my ($class, $params) = @_;
- my ($user, $pass, $host, $dbname, $port) =
+ my ($user, $pass, $host, $dbname, $port) =
@$params{qw(db_user db_pass db_host db_name db_port)};
- # The default database name for PostgreSQL. We have
- # to connect to SOME database, even if we have
- # no $dbname parameter.
- $dbname ||= 'template1';
-
# construct the DSN from the parameters we got
my $dsn = "dbi:Pg:dbname=$dbname";
$dsn .= ";host=$host" if $host;