Author: mjevans
Date: Tue Sep 19 03:18:25 2006
New Revision: 7847

Modified:
   dbi/trunk/DBI.pm

Log:
In execute_for_fetch, ensure -1 is returned for total rows affected if any
  execute fails to return the affected rows.


Modified: dbi/trunk/DBI.pm
==============================================================================
--- dbi/trunk/DBI.pm    (original)
+++ dbi/trunk/DBI.pm    Tue Sep 19 03:18:25 2006
@@ -1926,7 +1926,7 @@
        while ( my $tuple = &$fetch_tuple_sub() ) {
            if ( my $rc = $sth->execute(@$tuple) ) {
                push @$tuple_status, $rc;
-                $rc_total += $rc;
+               $rc_total = ($rc >= 0 && $rc_total >= 0) ? $rc_total + $rc : -1;
            }
            else {
                $err_count++;

Reply via email to