fix DBI connection string, RT#39250
authorIvan Kohler <ivan@freeside.biz>
Wed, 9 Dec 2015 22:40:38 +0000 (14:40 -0800)
committerIvan Kohler <ivan@freeside.biz>
Wed, 9 Dec 2015 22:40:38 +0000 (14:40 -0800)
FS/bin/freeside-cdr-mysql

index 608a8dc..fe0233b 100644 (file)
@@ -14,8 +14,8 @@ getopts('H:U:P:D:T:', \%opt);
 my $user = shift or die &usage;
 
 my $dsn = 'dbi:mysql';
-$dsn .= ":database=$opt{D}" if $opt{D};
-$dsn .= ":host=$opt{H}" if $opt{H};
+$dsn .= ":database=$opt{D}"; # if $opt{D};
+$dsn .= ";host=$opt{H}" if $opt{H};
 
 my $mysql = DBI->connect($dsn, $opt{U}, $opt{P}) 
   or die $DBI::errstr;