DBD::Proxy version 0.2004
fetch() doesn't set proxy_rows.
disconnect() shouldn't attempt to dereference rdbh if it isn't defined.
Patches attached.
Have a great day !
Philip Dye
Senior Research Systems Programmer
Computing Facilities Group
School of Computer Science
*** DBD/Proxy.pm.orig Mon Jun 25 19:40:16 2007
--- DBD/Proxy.pm Thu Aug 2 16:13:59 2007
*************** sub fetch ($) {
*** 609,614 ****
--- 609,615 ----
}
return undef unless @rows;
$sth->{'proxy_data'} = $data = [EMAIL PROTECTED];
+ $sth->{'proxy_rows'} = @rows;
}
my $row = shift @$data;
*** DBD/Proxy.pm.orig Mon Jun 25 19:40:16 2007
--- DBD/Proxy.pm Thu Aug 2 16:10:27 2007
*************** sub disconnect ($) {
*** 306,315 ****
# Drop database connection at remote end
my $rdbh = $dbh->{'proxy_dbh'};
local $SIG{__DIE__} = 'DEFAULT';
local $@;
! eval { $rdbh->disconnect() };
DBD::Proxy::proxy_set_err($dbh, $@) if $@;
# Close TCP connect to remote
# XXX possibly best left till DESTROY? Add a config attribute to choose?
--- 306,317 ----
# Drop database connection at remote end
my $rdbh = $dbh->{'proxy_dbh'};
+ if ( defined($rdbh) ) {
local $SIG{__DIE__} = 'DEFAULT';
local $@;
! eval { $rdbh->disconnect() } ;
DBD::Proxy::proxy_set_err($dbh, $@) if $@;
+ }
# Close TCP connect to remote
# XXX possibly best left till DESTROY? Add a config attribute to choose?