Handle no db_host specified, meaning local unix socket
This commit is contained in:
parent
87078dfc31
commit
6869710747
|
@ -972,7 +972,7 @@ sub patchDB {
|
||||||
my $dbh = shift;
|
my $dbh = shift;
|
||||||
my $version = shift;
|
my $version = shift;
|
||||||
|
|
||||||
my ( $host, $portOrSocket ) = ( $Config{ZM_DB_HOST} =~ /^([^:]+)(?::(.+))?$/ );
|
my ( $host, $portOrSocket ) = ( $Config{ZM_DB_HOST} =~ /^([^:]+)(?::(.+))?$/ ) if $Config{ZM_DB_HOST};
|
||||||
my $command = 'mysql';
|
my $command = 'mysql';
|
||||||
if ( defined($portOrSocket) ) {
|
if ( defined($portOrSocket) ) {
|
||||||
if ( $portOrSocket =~ /^\// ) {
|
if ( $portOrSocket =~ /^\// ) {
|
||||||
|
@ -980,7 +980,7 @@ sub patchDB {
|
||||||
} else {
|
} else {
|
||||||
$command .= ' -h'.$host.' -P'.$portOrSocket;
|
$command .= ' -h'.$host.' -P'.$portOrSocket;
|
||||||
}
|
}
|
||||||
} else {
|
} elsif ( $host ) {
|
||||||
$command .= ' -h'.$host;
|
$command .= ' -h'.$host;
|
||||||
}
|
}
|
||||||
if ( $dbUser ) {
|
if ( $dbUser ) {
|
||||||
|
|
Loading…
Reference in New Issue