projects
/
bucardo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
61c1d0d
)
Better error message if we try to indirectly connect to an unknown database via ...
author
Greg Sabino Mullane
<greg@endpoint.com>
Thu, 28 May 2015 02:37:59 +0000
(22:37 -0400)
committer
Greg Sabino Mullane
<greg@endpoint.com>
Thu, 28 May 2015 02:37:59 +0000
(22:37 -0400)
Example: bucardo add table foobar db=nosuchdb
bucardo
patch
|
blob
|
blame
|
history
diff --git
a/bucardo
b/bucardo
index 264e0885f340ef55d1b0200efece64cf52db8fa3..8effe97ffa39dd247dc84e1f9b4dc6d590ebdb52 100755
(executable)
--- a/
bucardo
+++ b/
bucardo
@@
-8578,6
+8578,10
@@
sub connect_database {
$opt = { name => $opt };
}
+ if (! exists $DB->{$opt->{name}}) {
+ die qq{Unknown database "$opt->{name}": try bucardo list dbs\n};
+ }
+
if (exists $opt->{name}) {
$SQL = qq{SELECT bucardo.db_getconn('$opt->{name}')};
my $conn = $dbh->selectall_arrayref($SQL)->[0][0];