Hi,
Thank you for reply to me, the attachment is the script than can display
the bug, just run the try.pl
=================== dependencies ================
perl activeperl v5.10.0 built for i686-linux-thread-multi
DBI: 1.607
AnyData: 0.10
AnyData::Format::Weblog: 0.06
=================== try.pl ========================
#!/home/ActivePerl-5.10/bin/perl
use strict;
use warnings;
use DBI;
use Data::Dumper;
my $file = shift;
$file ||= 'access_log';
my $sql = qq{
select remotehost,count(remotehost) as crh from accesslog group by
remotehost order by crh desc
};
my $dbh = DBI->connect("dbi:AnyData(RaiseError=>1):");
$dbh->func('accesslog','Weblog',$file,'ad_catalog');
my $sth = $dbh->prepare($sql);
$sth->execute();
while(my @res = $sth->fetchrow_array){
print join('|',@res),"\n";
}
$sth->finish();
$dbh->disconnect();
================== head of access_log ==========
192.168.192.149 - - [31/Mar/2010:00:00:00 +0800] "GET
/cgi-bin/john/logoutjohn.fcgi HTTP/1.0" 200 7599 125.79.143.144
192.168.192.149 - - [31/Mar/2010:00:00:00 +0800] "GET /john/job_sy.html?
HTTP/1.0" 200 10763 125.79.143.144
192.168.208.93 - - [31/Mar/2010:00:00:00 +0800] "GET
/cgi-bin/john/index.fcgi HTTP/1.0" 200 7151 61.138.125.11
192.168.208.92 - - [31/Mar/2010:00:00:02 +0800] "GET /bill/job_sy.html?
HTTP/1.0" 200 10603 219.229.173.58
192.168.192.149 - - [31/Mar/2010:00:00:02 +0800] "GET
/cgi-bin/john/flowjohn.fcgi?tm=3 HTTP/1.0" 200 1483 120.68.47.26
192.168.208.93 - - [31/Mar/2010:00:00:03 +0800] "GET
/cgi-bin/john/index.fcgi HTTP/1.0" 200 7149 60.28.129.250
192.168.208.93 - - [31/Mar/2010:00:00:04 +0800] "GET
/john/job_gz_2010.html? HTTP/1.0" 200 16738 61.138.125.11
192.168.208.92 - - [31/Mar/2010:00:00:05 +0800] "GET
/bill/job_yjhd.html?dselkn8 HTTP/1.0" 200 16742 58.251.166.6
192.168.192.150 - - [31/Mar/2010:00:00:05 +0800] "GET
/cgi-bin/bill/newusr.fcgi HTTP/1.0" 200 1587 58.51.82.14
192.168.192.149 - - [31/Mar/2010:00:00:05 +0800] "GET
/cgi-bin/john/index.fcgi HTTP/1.0" 200 7147 125.79.143.144
================== result ===============
$ ./try.pl
192.168.208.93|62
192.168.208.92|68
192.168.192.150|42
192.168.192.149|63
192.168.192.148|65
but I think the correct result should be:
192.168.208.92|68
192.168.192.148|65
192.168.192.149|63
192.168.208.93|62
192.168.192.150|42
Best regards,
Young
On Tue Apr 27 07:23:52 2010, REHSACK wrote:
Show quoted text> Hi,
>
> even if I don't have now time to care, what will help me in future when
> I investigate the time to fix it:
>
> 1) Full list of dependent module versions
> e.g.:
> AnyData: 0.10
> DBI: 1.609
> ...
>
> 2) Reproducable test case
> Must include:
> 2a) Test script, which will run out of the box on any system which
> fullfills prerequisites in (1) or any updated version of enumerated
> prerequisites.
> 2b) If not includable in test script, test data which demonstrates the
> failure.
>
> Best regards,
> Jens