Bug 8114 - Top function doesn't work right after libDBI move
Summary: Top function doesn't work right after libDBI move
Status: RESOLVED FIXED
Alias: None
Product: smbta
Classification: Unclassified
Component: smbtaquery (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal
Target Milestone: ---
Assignee: Holger Hetterich
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 8049
  Show dependency treegraph
 
Reported: 2011-05-01 21:17 UTC by Holger Hetterich
Modified: 2011-05-02 13:48 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Hetterich 2011-05-01 21:17:12 UTC
This is an SQL problem, we don't count the total sum of the objects we are looking for. Robert, that was what I asked about recently in #smbta, and the proposed SQL statement doesn't work as it is not taking sum() into account.

This blocks 1.2.4
Comment 1 Holger Hetterich 2011-05-01 21:19:03 UTC
hope to fix this this week
Comment 2 Holger Hetterich 2011-05-02 13:48:32 UTC
select distinct filename, share, domain, sum(length) OVER (Partition by filename) from ( select * from read UNION select * from write) as subrequest where  1=1 and 1=1 and 1=1 order by sum(length) OVER (Partition by filename) desc limit 10;

Using the "over" SQL statement fixes this, committed as 6cb0e9e to the devel branch.