Permalink
Browse files

bug fix when searching for tuples

  • Loading branch information...
1 parent c01219d commit 9bcb32f18f5750847efaf21ace40ebf7e674bc73 @barbie barbie committed Nov 1, 2009
Showing with 10 additions and 6 deletions.
  1. +3 −0 CHANGES
  2. +2 −2 META.yml
  3. +5 −4 lib/CPAN/Testers/WWW/Reports/Mailer.pm
View
@@ -1,5 +1,8 @@
Revision history for Perl module CPAN::Testers::WWW::Reports::Mailer.
+0.21 01/11/2009
+ - bug fix when searching for tuples.
+
0.20 10/08/2009
- added many more tests
- added more diagnostics in debug mode
View
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: CPAN-Testers-WWW-Reports-Mailer
-version: 0.20
+version: 0.21
abstract: CPAN Testers Reports Mailer
author:
- Barbie <barbie@cpan.org>
@@ -34,7 +34,7 @@ requires:
provides:
CPAN::Testers::WWW::Reports::Mailer:
file: lib/CPAN/Testers/WWW/Reports/Mailer.pm
- version: 0.20
+ version: 0.21
meta-spec:
version: 1.4
@@ -4,7 +4,7 @@ use warnings;
use strict;
use vars qw($VERSION);
-$VERSION = '0.20';
+$VERSION = '0.21';
=head1 NAME
@@ -200,7 +200,7 @@ my %phrasebook = (
'GetReports' => "SELECT id,dist,version,platform,perl,state FROM cpanstats WHERE id > ? AND state IN ('pass','fail','na','unknown') ORDER BY id",
'GetReports2' => "SELECT c.id,c.dist,c.version,c.platform,c.perl,c.state FROM cpanstats AS c INNER JOIN ixlatest AS x ON x.dist=c.dist WHERE c.id > ? AND c.state IN ('pass','fail','na','unknown') AND author IN (%s) ORDER BY id",
- 'GetReportCount' => "SELECT id FROM cpanstats WHERE platform=? AND perl=? AND state=? AND id < ? LIMIT 2",
+ 'GetReportCount' => "SELECT id FROM cpanstats WHERE platform=? AND perl=? AND state=? AND id < ? AND dist=? AND version=? LIMIT 2",
'GetLatestDistVers' => "SELECT version FROM cpanstats WHERE dist=? AND state='cpan' ORDER BY id DESC LIMIT 1",
'GetAuthor' => "SELECT tester FROM cpanstats WHERE dist=? AND version=? AND state='cpan' LIMIT 1",
@@ -416,9 +416,10 @@ sub check_reports {
# check whether only first instance required
if($prefs->{tuple} eq 'FIRST') {
- my @count = $self->{CPANSTATS}->get_query('array',$phrasebook{'GetReportCount'}, $row->{platform}, $row->{perl}, $row->{state}, $row->{id});
+ my @count = $self->{CPANSTATS}->get_query('array',$phrasebook{'GetReportCount'},
+ $row->{platform}, $row->{perl}, $row->{state}, $row->{id}, $row->{dist}, $row->{version});
$self->_log( "DEBUG: dist prefs: tuple=FIRST, count=".(scalar(@count))."\n" ) if($self->debug);
- next if(@count > 1);
+ next if(@count > 0);
}
# Check whether distribution version is required.

0 comments on commit 9bcb32f

Please sign in to comment.