]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1896338: properly detect if the DB already exists during setup (#181)
authorDave Miller <justdave@bugzilla.org>
Tue, 14 May 2024 06:02:48 +0000 (02:02 -0400)
committerGitHub <noreply@github.com>
Tue, 14 May 2024 06:02:48 +0000 (02:02 -0400)
Bugzilla/DB.pm

index d826100938c2825e95c18cdeb049056f200e7bfa..8ef3d36fa3a9362bfbb3cc89df8f8499991e9197 100644 (file)
@@ -299,7 +299,7 @@ sub bz_create_database {
   my $dbh;
 
   # See if we can connect to the actual Bugzilla database.
-  my $conn_success = eval { $dbh = connect_main() };
+  my $conn_success = eval { $dbh = connect_main(); $dbh->ping(); };
   my $db_name      = Bugzilla->localconfig->{db_name};
 
   if (!$conn_success) {