When adding all tables, make sure we truly find the best db (previous check was not...
authorGreg Sabino Mullane <greg@endpoint.com>
Fri, 13 Jun 2014 11:01:31 +0000 (07:01 -0400)
committerGreg Sabino Mullane <greg@endpoint.com>
Fri, 13 Jun 2014 11:01:31 +0000 (07:01 -0400)
bucardo

diff --git a/bucardo b/bucardo
index 0cfc16ae5d0c187412bd2728100b00ca45fe4a24..d62a03687284e72a890098b1ff647580f825df8d 100755 (executable)
--- a/bucardo
+++ b/bucardo
@@ -4632,7 +4632,8 @@ sub get_goat_ids {
     my %new;
 
     ## Figure out which database to search in, unless already given
-    my $bestdb = exists $dbcols->{db} ? $dbcols->{db} : find_best_db_for_searching();
+    my $bestdb = (exists $dbcols->{db} and defined $dbcols->{db})
+    ? $dbcols->{db} : find_best_db_for_searching();
 
     ## This check still makes sense: if no databases, there should be nothing in $GOAT!
     if (! defined $bestdb) {