Closed
Bug 286686
Opened 20 years ago
Closed 20 years ago
ORDER BY column needs to be selected or grouped
Categories
(Bugzilla :: Bugzilla-General, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.20
People
(Reporter: Tomas.Kopal, Assigned: Tomas.Kopal)
References
Details
Attachments
(1 file, 3 obsolete files)
2.43 KB,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
For normal selects, Postgres requires columns, which are used in the ORDER BY
clause to be also in GROUP BY. For SELECT DISTINCT, columns used in ORDER BY
needs to be SELECTed.
Patch will follow
Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
Flags: blocking2.20?
Target Milestone: --- → Bugzilla 2.20
Assignee | ||
Comment 1•20 years ago
|
||
In the course of fixing this, I was actually able to get rid of one query in
editusers.cgi, yupeee :-).
Attachment #177832 -
Flags: review?(mkanat)
Updated•20 years ago
|
Flags: blocking2.20? → blocking2.20+
Comment 2•20 years ago
|
||
>- my $query = 'SELECT DISTINCT userid, login_name, realname, disabledtext ' .
>- 'FROM profiles';
>+ my $query = 'SELECT DISTINCT userid, login_name, realname, ' .
>+ 'disabledtext, login_name FROM profiles';
I'm no Pg guy, but this seems strange to me... Do you really need to read
login_name twice?
Assignee | ||
Comment 3•20 years ago
|
||
(In reply to comment #2)
> >- my $query = 'SELECT DISTINCT userid, login_name, realname, disabledtext ' .
> >- 'FROM profiles';
> >+ my $query = 'SELECT DISTINCT userid, login_name, realname, ' .
> >+ 'disabledtext, login_name FROM profiles';
>
> I'm no Pg guy, but this seems strange to me... Do you really need to read
> login_name twice?
Ummmm, no? :-) Sorry, my oversight, I will fix that, thanks.
Assignee | ||
Updated•20 years ago
|
Attachment #177832 -
Flags: review?(mkanat)
Assignee | ||
Comment 4•20 years ago
|
||
Fixed comment #2.
Assignee | ||
Updated•20 years ago
|
Attachment #177832 -
Attachment is obsolete: true
Attachment #179644 -
Flags: review?(mkanat)
Assignee | ||
Comment 5•20 years ago
|
||
Sorry for the spam, I was a bit trigger-happy. I removed the functional change,
but didn't remove change in formatting. Fixed.
Attachment #179644 -
Attachment is obsolete: true
Attachment #179645 -
Flags: review?(mkanat)
Assignee | ||
Updated•20 years ago
|
Attachment #179644 -
Flags: review?(mkanat)
Comment 6•20 years ago
|
||
Comment on attachment 179645 [details] [diff] [review]
V1.2
Hrm... this patch seems to be missing the actual SQL change for editusers.cgi,
and so now any actual changes to that file as a part of this bug aren't
necessary, right?
Assignee | ||
Comment 7•20 years ago
|
||
(In reply to comment #6)
> (From update of attachment 179645 [details] [diff] [review] [edit])
> Hrm... this patch seems to be missing the actual SQL change for editusers.cgi,
> and so now any actual changes to that file as a part of this bug aren't
> necessary, right?
>
Well, yes, I suppose. But I am sure the change in that file is still a valid
improvement. Should I move it to a different bug then?
Comment 8•20 years ago
|
||
(In reply to comment #7)
> Well, yes, I suppose. But I am sure the change in that file is still a valid
> improvement. Should I move it to a different bug then?
Sure. :-) I always like code cleanup.
And then you can ask wurblzap for review. :-)
Assignee | ||
Comment 9•20 years ago
|
||
Removed editusers.cgi part of the patch to bug 289062.
Attachment #179645 -
Attachment is obsolete: true
Attachment #179660 -
Flags: review?(mkanat)
Assignee | ||
Updated•20 years ago
|
Attachment #179645 -
Flags: review?(mkanat)
Comment 10•20 years ago
|
||
Comment on attachment 179660 [details] [diff] [review]
V1.3
Great! This is now obviously correct. :-)
Attachment #179660 -
Flags: review?(mkanat) → review+
Assignee | ||
Updated•20 years ago
|
Flags: approval?
Updated•20 years ago
|
Flags: approval? → approval+
Comment 11•20 years ago
|
||
Checking in summarize_time.cgi;
/cvsroot/mozilla/webtools/bugzilla/summarize_time.cgi,v <--
summarize_time.cginew revision: 1.7; previous revision: 1.6
done
Checking in Bugzilla/User.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/User.pm,v <-- User.pm
new revision: 1.51; previous revision: 1.50
done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Version: unspecified → 2.19.2
You need to log in
before you can comment on or make changes to this bug.
Description
•