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

index 268f5cd477bfff757191008f4b9bc23d63b2e5ed..3b9659f31d2bb51ed2c30b9a42bfe67f7b86b2f3 100644 (file)
@@ -337,7 +337,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) {