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 147067 - SQL History: Sort only works by date, not SQL
Summary: SQL History: Sort only works by date, not SQL
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: SQL Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: John Baker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-12 12:32 UTC by Roman Mostyka
Modified: 2008-09-18 17:58 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Screenshot of wrong order in SQL History. (143.71 KB, image/png)
2008-09-12 12:38 UTC, Roman Mostyka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Mostyka 2008-09-12 12:32:33 UTC
1. Register MySQL server.
2. Create all samples databases.
3. Open SQL History and sort by statements.

Result: Sort order is wrong.
Comment 1 Roman Mostyka 2008-09-12 12:38:02 UTC
Created attachment 69739 [details]
Screenshot of wrong order in SQL History.
Comment 2 John Baker 2008-09-12 13:15:56 UTC
Sort sorts only by date not statement.  It might be nice to sort by statement, but I didn't see a benefit.
If you want to group by statement you can just type the first few characters that match some SQL in the match box.

Note, issue 138081 suggests to sort by date and other discussions suggested the same, just sort by date.

btw the attachment could not be opened (at least on Mac).
Comment 3 Roman Mostyka 2008-09-12 13:24:40 UTC
I made this screenshot on Mac, but there is no MIME type for tiff in issuezilla, I guess you can download it and then
open. But not sure. Anyway you can reproduce this issue by yourself.
About issue itself: it is possible to click on statements header and it is expectable that click will do the same as it
does for dates. It can mislead customer. And there are benefits, it depends on what is more usual for different people,
for some type in matchbox, for some order table. So I think it should be implemented.
Comment 4 John Baker 2008-09-12 14:07:33 UTC
I think this is easy to sort by SQL.  I'll look at this later today
Comment 5 John Baker 2008-09-12 18:53:42 UTC
The sort order is working as designed.  I'll try to implement sort by statement, but this should be an enhancement
Comment 6 John Baker 2008-09-18 02:41:41 UTC
9d49bc57ac82

Comment 7 Roman Mostyka 2008-09-18 13:51:56 UTC
Verified with build 080918.
Comment 8 Quality Engineering 2008-09-18 17:58:16 UTC
Integrated into 'main-golden', will be available in build *200809181401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/9d49bc57ac82
User: John Baker <jbaker@netbeans.org>
Log: #147067 SQL History: Sort only works by date, not SQL