1 # Test to ensure we get a consistent result set wether or not we use the
2 # prefetch option in combination rows (LIMIT).
10 plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 2);
12 my $schema = DBICTest->init_schema();
13 my $no_prefetch = $schema->resultset('Artist')->search(
18 my $use_prefetch = $schema->resultset('Artist')->search(
26 my $no_prefetch_count = 0;
27 my $use_prefetch_count = 0;
29 is($no_prefetch->count, $use_prefetch->count, '$no_prefetch->count == $use_prefetch->count');
32 local $TODO = "This is a difficult bug to fix, workaround is not to use prefetch with rows";
33 $no_prefetch_count++ while $no_prefetch->next;
34 $use_prefetch_count++ while $use_prefetch->next;
38 "manual row count confirms consistency"
39 . " (\$no_prefetch_count == $no_prefetch_count, "
40 . " \$use_prefetch_count == $use_prefetch_count)"