Author: spadkins
Date: Mon Jul 24 10:21:21 2006
New Revision: 6695
Modified:
p5ee/trunk/App-Repository/lib/App/Repository/MySQL.pm
Log:
add support for dbsocket option
Modified: p5ee/trunk/App-Repository/lib/App/Repository/MySQL.pm
==============================================================================
--- p5ee/trunk/App-Repository/lib/App/Repository/MySQL.pm (original)
+++ p5ee/trunk/App-Repository/lib/App/Repository/MySQL.pm Mon Jul 24 10:21:21 2006
@@ -82,6 +82,7 @@
my $dbschema = $self->{dbschema};
my $dbhost = $self->{dbhost};
my $dbport = $self->{dbport};
+ my $dbsocket = $self->{dbsocket};
die "ERROR: missing DBI driver and/or db name [$dbdriver,$dbname] in configuration.\n"
if (!$dbdriver || !$dbname);
@@ -95,7 +96,8 @@
$dsn = "dbi:${dbdriver}:database=${dbname}";
$dsn .= ";host=$dbhost" if ($dbhost);
- $dsn .= ";port=$dbport" if ($dbport); # if $dbhost not supplied, $dbport is path to Unix socket
+ $dsn .= ";port=$dbport" if ($dbport);
+ $dsn .= ";mysql_socket=$dbsocket" if ($dbsocket);
$dsn .= ";mysql_client_found_rows=true";
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.