projects
/
virtual-ldap
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
48aedc5
)
use connect_cached so we will reconnect when mysql drops connection
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 19 Apr 2010 13:48:35 +0000
(13:48 +0000)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 19 Apr 2010 13:48:35 +0000
(13:48 +0000)
lib/LDAP/Koha.pm
patch
|
blob
|
history
diff --git
a/lib/LDAP/Koha.pm
b/lib/LDAP/Koha.pm
index
b0c726c
..
540d278
100644
(file)
--- a/
lib/LDAP/Koha.pm
+++ b/
lib/LDAP/Koha.pm
@@
-39,8
+39,6
@@
$SIG{__DIE__} = sub {
require 'config.pl' if -e 'config.pl';
require 'config.pl' if -e 'config.pl';
-my $dbh = DBI->connect($dsn . $database, $user,$passwd, { RaiseError => 1, AutoCommit => 1 }) || die $DBI::errstr;
-
# we need reverse LDAP -> SQL mapping for where clause
my $ldap_sql_mapping = {
# we need reverse LDAP -> SQL mapping for where clause
my $ldap_sql_mapping = {
@@
-208,6
+206,7
@@
sub search {
;
warn "# SQL:\n$sql\n# DATA: ",dump( @values );
;
warn "# SQL:\n$sql\n# DATA: ",dump( @values );
+ my $dbh = DBI->connect_cached($dsn . $database, $user,$passwd, { RaiseError => 1, AutoCommit => 1 }) || die $DBI::errstr;
my $sth = $dbh->prepare( $sql );
$sth->execute( @values );
my $sth = $dbh->prepare( $sql );
$sth->execute( @values );