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)
Tracking
()
RESOLVED
DUPLICATE
of bug 174295
People
(Reporter: dkl, Assigned: justdave)
Details
Attachments
(1 file)
11.73 KB,
patch
|
Details | Diff | Splinter Review |
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.
Reporter | ||
Comment 1•20 years ago
|
||
Comment 2•20 years ago
|
||
make sure you try this with some derived fields (timetracking stuff)
Reporter | ||
Updated•20 years ago
|
Blocks: bz-postgres
Assignee | ||
Comment 3•20 years ago
|
||
*** This bug has been marked as a duplicate of 174295 ***
*** This bug has been marked as a duplicate of 174295 ***
Updated•12 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•