23,24c23,24
< my %LastPingTime; # keeps track of last ping per data_source
< my $Idx;          # key of %Connected and %Rollback.
---
> my %LastPingTime; # keeps track of last ping per database handle
> my $Idx;          # key of %Connected, %Rollback, and %LastPingTime.
101c101
<     $LastPingTime{$dsn} = 0 unless $LastPingTime{$dsn};
---
>     $LastPingTime{$Idx} = 0 unless $LastPingTime{$Idx};
103c103
<     my $needping = (($PingTimeOut{$dsn} == 0 or $PingTimeOut{$dsn} > 0) and $now - $LastPingTime{$dsn} > $PingTimeOut{$dsn}) ? 1 : 0;
---
>     my $needping = (($PingTimeOut{$dsn} == 0 or $PingTimeOut{$dsn} > 0) and $now - $LastPingTime{$Idx} > $PingTimeOut{$dsn}) ? 1 : 0;
105c105
<     $LastPingTime{$dsn} = $now;
---
>     $LastPingTime{$Idx} = $now;
139d138
<             $LastPingTime{@$aref[0]} = time;
