From 6ca2131852dcf93f6420690ced6a545aa1c95a10 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Fri, 13 Jun 2014 07:01:31 -0400 Subject: [PATCH] When adding all tables, make sure we truly find the best db (previous check was not enough, as dbcols->{db} was often undef but existed) --- bucardo | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bucardo b/bucardo index 0cfc16ae5..d62a03687 100755 --- 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) { -- 2.39.5