Tim,
I see you've "tweaked" the pod changes I made for the new execute_array
in array context so it now says -1 is returned as the rows affected if
the driver can't return the rows affected.
I think the change to DBI's execute_for_fetch for drivers not
implementing execute_for_fetch contains something like:
if ( my $rc = $sth->execute(@$tuple) ) {
push @$tuple_status, $rc;
$rc_total += $rc;
}
and later:
return ($tuples, $rc_total);
so in fact, the returned value for drivers which don't implement
execute_for_fetch and also cannot return the rows affected on a per row
basis would normally be -1 * tuples_executed which is not always -1.
Does this require a pod change (to say it returns -1 * tuples_executed
or perhaps just a negative number) or a execute_for_fetch in DBI change
(so it returns -1 if ANY of the $rc's is -1)? I'm guessing the latter
because it seems more logical and it is possible if a driver can return
the per rows affected for some executes and not others you might get
negative and positive values adding up to any number and leading to
confusion.
I'm happy to make whichever change after guidance.
Martin
--
Martin J. Evans
Easysoft Ltd, UK
http://www.easysoft.com