Author: timbo
Date: Mon Mar 15 01:56:47 2004
New Revision: 228
Modified:
dbi/trunk/Changes
dbi/trunk/DBI.pm
dbi/trunk/ToDo
dbi/trunk/t/40profile.t
Log:
Changed selectall_arrayref() to call finish() if $attr->{MaxRows} is defined.
Added more detail to t/40profile.t 'time went backwards' message.
Modified: dbi/trunk/Changes
==============================================================================
--- dbi/trunk/Changes (original)
+++ dbi/trunk/Changes Mon Mar 15 01:56:47 2004
@@ -11,6 +11,9 @@
Fixed compiler warning thanks to Paul Marquess.
Fixed "trace level set to" trace message thanks to H.Merijn Brand.
+ Changed selectall_arrayref() to call finish() if
+ $attr->{MaxRows} is defined.
+
=head1 CHANGES in DBI 1.42 (svn rev 222), 12th March 2004
Fixed $sth->{NUM_OF_FIELDS} of non-executed statement handle
Modified: dbi/trunk/DBI.pm
==============================================================================
--- dbi/trunk/DBI.pm (original)
+++ dbi/trunk/DBI.pm Mon Mar 15 01:56:47 2004
@@ -1448,7 +1448,9 @@
for (@$slice) { $_-- }
}
}
- return $sth->fetchall_arrayref($slice, $attr->{MaxRows});
+ my $rows = $sth->fetchall_arrayref($slice, my $MaxRows = $attr->{MaxRows});
+ $sth->finish if defined $MaxRows;
+ return $rows;
}
sub selectall_hashref {
@@ -3505,7 +3507,8 @@
The L</fetchall_arrayref> method called by C<selectall_arrayref>
supports a $max_rows parameter. You can specify a value for $max_rows
-by including a 'C<MaxRows>' attribute in \%attr.
+by including a 'C<MaxRows>' attribute in \%attr. In which case finish()
+is called for you after fetchall_arrayref() returns.
The L</fetchall_arrayref> method called by C<selectall_arrayref>
also supports a $slice parameter. You can specify a value for $slice by
Modified: dbi/trunk/ToDo
==============================================================================
--- dbi/trunk/ToDo (original)
+++ dbi/trunk/ToDo Mon Mar 15 01:56:47 2004
@@ -80,12 +80,10 @@
And enable xsbypass in dispatch if possible.
Remove PERL_POLLUTE
-Require a CLONE method.
-
Add function pointer for setting fetched field values into DBIS.
Drivers would use this instead of calling sv_setpv (etc) themselves.
-Add bind_col($n, $foo, { OnFetch => sub { ... } });
+Add bind_col($n, \$foo, { OnFetch => sub { ... } });
Add way to specify default bind_col attributes for each TYPE
e.g. $dbh->{BindColumnTypes} = {
Modified: dbi/trunk/t/40profile.t
==============================================================================
--- dbi/trunk/t/40profile.t (original)
+++ dbi/trunk/t/40profile.t Mon Mar 15 01:56:47 2004
@@ -94,9 +94,13 @@
ok((grep { $_ >= 0 } @$data) == 7) or warn "profile data: [EMAIL
PROTECTED]";
my ($count, $total, $first, $shortest, $longest, $time1, $time2) = @$data;
if ($shortest < 0) {
- warn "Time went backwards at some point during the test on this $Config{archname}
system!\n";
+ my $sys = "$Config{archname} $Config{osvers}"; # sparc-linux 2.4.20-2.3sparcsmp
+ warn "Time went backwards at some point during the test on this $sys system!\n";
warn "Perhaps you have time sync software (like NTP) that adjusted the clock\n";
- warn "backwards by more than $shortest seconds during the test.\n";
+ warn "backwards by more than $shortest seconds during the test. PLEASE RETRY.\n";
+ # Don't treat very small negative amounts as a failure - it's always been due
+ # due to NTP of buggy multiprocessor systems.
+ $shortest = 0 if $shortest > -0.008;
}
ok($count > 3);
ok($total > $first);