On Thu, 21 Aug 2003, Tim Bunce wrote:

> On Wed, Aug 20, 2003 at 03:49:18PM +0100, Tim Bunce wrote:
> > I'd be grateful if you could take a moment to try out this
> > release candidate of DBI 1.38:
> 
> Thanks for all the feedback. Here's another. I've changed a few
> small things including enabling better testing of Driver.xst.
> I'm doing another release candidate because I suspect that might
> generate some compiler warings on some platforms.
> 
> Same routine...
> 
>   http://homepage.eircom.net/~timbunce/DBI-1.38-rc2-20030821.tar.gz

Tim,

I plan to beat on this over the next few days.  However, here are two 
small changes which I've found to be necessary when working with a DB2 
backend database.  Since making these mods all ugly messages are a thing 
of the past.

In my opinion, it's time to throw in the towel and report the true 
'Active' status back to the proxy client with every call.  I'm getting 
hammered at work, but will attempt to code this up "Real Soon Now" <g>.

Steve


--- DBI-1.38/lib/DBD/Proxy.pm.orig      Tue Aug 19 20:15:28 2003
+++ DBI-1.38/lib/DBD/Proxy.pm   Thu Aug 28 09:44:22 2003
@@ -352,8 +352,10 @@
       $sth->{'proxy_sth'} = $rsth;
       # If statement is a positioned update we do not want any readahead.
       $sth->{'RowCacheSize'} = 1 if $stmt =~ /\bfor\s+update\b/i;
-    # Since resources are used by prepared remote handle, mark us active.
-    $sth->SUPER::STORE(Active => 1);
+      # In a perfect world, this would be correct.  However, until a clean
+      # universal solution is implemented for keeping the client in sync
+      # with the backend database, refrain from making a leap of faith.
+      # $sth->SUPER::STORE(Active => 1);
     }
     $sth;
 }
@@ -577,7 +579,9 @@
 
 sub finish ($) {
     my($sth) = @_;
-    return 1 unless $sth->SUPER::FETCH('Active');
+    # For reasons remarked upon in disconnect() above, let the
+    # user decide when to hit the wire.
+    # return 1 unless $sth->SUPER::FETCH('Active');
     my $rsth = $sth->{'proxy_sth'};
     $sth->SUPER::STORE('Active' => 0);
     return 0 unless $rsth; # Something's out of sync


-- 
----------------------------------------------------------------
Steven N. Hirsch       tie-line: 446-6557     ext: 802-769-6557

Staff Engineer                     Methodology Integration Team
ASIC Product Development           IBM Microelectronics
----------------------------------------------------------------

Reply via email to