Great. Thanks.

Tim.

On Mon, Sep 17, 2001 at 04:32:41PM +0200, Jochen Wiedmann wrote:
> 
> Hi, Tim,
> 
> the following patch should enable support for AutoCommit
> in DBD::Proxy. The problem was, that the handling of
> AutoCommit was left to the superclass (DBI::_::db), which
> refuses to handle it.
> 
> Thanks,
> 
> Jochen
> 
> 

> --- Proxy.pm  Fri Aug 24 22:05:44 2001
> +++ c:\Perl\site\lib\DBD\Proxy.pm     Mon Sep 17 13:49:45 2001
> @@ -175,7 +175,8 @@
>      'CachedKids' => 'local',
>      'PrintError' => 'local',
>      'RaiseError' => 'local',
> -    'RowCacheSize' => 'inherited'
> +    'RowCacheSize' => 'inherited',
> +    'AutoCommit' => 'cached'
>  );
>  
>  sub AUTOLOAD {
> @@ -237,9 +238,10 @@
>       return 1;
>      }
>  
> -    if ($type eq 'remote') {
> +    if ($type eq 'remote'  ||  $type eq 'cached') {
>       my $result = eval { $dbh->{'proxy_dbh'}->STORE($attr => $val) };
>       return DBI::set_err($dbh, 1, $@) if $@; # returns undef
> +     $dbh->{$attr} = $val if $type eq 'cached';
>       return $result;
>      }
>      return $dbh->SUPER::STORE($attr => $val);
> @@ -249,7 +251,8 @@
>      my($dbh, $attr) = @_;
>      my $type = $ATTR{$attr} || 'remote';
>  
> -    if ($attr =~ /^proxy_/  ||  $type eq 'inherited') {
> +    if ($attr =~ /^proxy_/  ||  $type eq 'inherited'  ||
> +     $type eq 'cached') {
>       return $dbh->{$attr};
>      }
>  

Reply via email to