Changeset 2475
- Timestamp:
- 06/02/08 02:15:39 (21 months ago)
- Location:
- branches/release-39
- Files:
-
- 3 modified
-
lib/MT/ObjectDriver/Driver/DBI.pm (modified) (1 diff)
-
t/41-atom.t (modified) (2 diffs)
-
t/driver-tests.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/release-39/lib/MT/ObjectDriver/Driver/DBI.pm
r2473 r2475 201 201 my $i = 0; 202 202 return sub { 203 if (@_ && ($_[0] eq 'finish')) { 204 if ($sth) { 205 $sth->finish; 206 $driver->end_query($sth); 207 } 208 undef $sth; 209 return; 210 } 211 203 212 unless ($sth->fetch && defined $count && (!defined $limit || ($i < $limit))) { 204 213 $sth->finish; -
branches/release-39/t/41-atom.t
r2457 r2475 416 416 #print "$_\n" foreach @{$p->query_log}; 417 417 my ( $count, $eid ) = $iter->(); 418 # finish iterator cleanly 419 while ( my @dump = $iter->() ) {} 418 $iter->('finish'); 420 419 421 420 my $entry = MT::Entry->load($eid); … … 575 574 } 576 575 } 577 # finish iterator cleanly 578 while ( my @dump = $iter->() ) {} 576 $iter->('finish'); 579 577 die unless $eid; 580 578 -
branches/release-39/t/driver-tests.pl
r2286 r2475 404 404 }, { 405 405 group => [ 'foo_id' ], 406 sort => 'foo_id desc', 406 sort => 'foo_id', 407 direction => 'descend', 407 408 }); 408 409 my ($count, $bfid, $month); … … 418 419 $cgb_iter = Bar->count_group_by(undef, { 419 420 group => [ 'extract(month from created_on)' ], 420 sort => 'extract(month from created_on) desc', 421 sort => 'extract(month from created_on)', 422 direction => 'descend', 421 423 }); 422 424 isa_ok($cgb_iter, 'CODE');
