[Dbix-class] Count maxes out at 127

Steve steve at matsch.com
Thu Sep 10 19:39:55 GMT 2009


I'm wondering why I get an incorrect count on the following search/query:
 my $uniquenum_rs=$calldetail_rs->search(undef, {
    select => [ 'connecttonum',
        {count =>'connecttonum'},
        {sum=>'duration},
        'date', 'time', direction'],
    as => [ 'a', 'b' and so on...],
     group_by => [connecttonum],
    });

The resulting query:
SELECT connecttonum, COUNT( connecttonum ), SUM( duration ), date, time, 
direction FROM CMSUsageDetail me WHERE ( ( ( carrierbill_banid = ? AND 
pbflag IS NULL AND usagetype = ? ) AND me.subscriptionid = ? ) ) GROUP 
BY connecttonum: '6', 'C', '1'

Other perhaps relevant details: Perl 5.8.8, MySQL 5.0.22, DBIx::Class .08107
I have done raw sql queries on the same data and verified that the count 
should be more than 127.  Out of 3000+ queries, about 40 were 
artificially limited to 127.

Any thoughts?

Steve




More information about the DBIx-Class mailing list