Closed Bug 247998 Opened 20 years ago Closed 20 years ago

Group by clauses need to have all columns listed for db independence

Categories

(Bugzilla :: Bugzilla-General, defect)

2.17.7
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 174295

People

(Reporter: dkl, Assigned: justdave)

Details

Attachments

(1 file)

Group by clauses need to have all columns listed that are not part of an aggregate function for better database independence. For example current SQL resembles: SendSQL("SELECT products.name,description,disallownew, votesperuser,maxvotesperbug,votestoconfirm,COUNT(bug_id) FROM products LEFT JOIN bugs ON products.id = bugs.product_id GROUP BY products.name ORDER BY products.name"); Change to: SendSQL("SELECT products.name,description,disallownew, votesperuser,maxvotesperbug,votestoconfirm,COUNT(bug_id) FROM products LEFT JOIN bugs ON products.id = bugs.product_id GROUP BY products.name, description, disallownew, votesperuser, maxvotesperbug, votestoconfirm ORDER BY products.name"); I have patch and will attach when bug is submitted. I will also make this bug a blocker of the PostgreSQL support bug.
make sure you try this with some derived fields (timetracking stuff)
Blocks: bz-postgres
*** This bug has been marked as a duplicate of 174295 *** *** This bug has been marked as a duplicate of 174295 ***
No longer blocks: bz-postgres
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: