This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 143816 - [65cat] 'Total Rows' is wrong for group by statements
Summary: [65cat] 'Total Rows' is wrong for group by statements
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Show Data (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: _ ahimanikya
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-13 21:31 UTC by Michel Graciano
Modified: 2008-08-20 19:04 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2008-08-13 21:31:09 UTC
[ BUILD # : 200808111401 ]
[ JDK VERSION : 1.6.0_07 ]

Try the follow sql script fro TRAVEL database:

  select FLIGHTNUM
    from FLIGHT
group by FLIGHTNUM;

and the 'Total Rows: 1 (Page 1 of 1)' where there is more than one
row listed and, for bigger queries will be there more pages too.
Comment 1 _ ahimanikya 2008-08-19 21:50:40 UTC
There is no easy way to get total rows count if group by is used, so I will disable paging and total counts, however,
the default page size can be changed to see whether there are more rows. This is not a very clean solution, but this is
better than we have.
Comment 2 Michel Graciano 2008-08-19 21:59:35 UTC
At least, if you have less than one page, you can show the total count. It will be useful anyway.
Comment 3 _ ahimanikya 2008-08-19 22:08:59 UTC
I guess it will bit tricky, I don't have good way to guess the data is less than one page unless I loop the dataset to
find total rows, that may work in this use case, but will create nonperformance issues for other use cases. 
Comment 4 _ ahimanikya 2008-08-19 23:24:26 UTC
http://hg.netbeans.org/main/rev/7f41a4169763
Comment 5 Roman Mostyka 2008-08-20 19:04:16 UTC
Verified with build 080820.