6.0.0-beta1
7/5/25

[#10635] missing columns in GROUP BY
Summary missing columns in GROUP BY
Queue Ansel
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester thpo+horde (at) dotrc (dot) de
Created 10/12/2011 (5015 days ago)
Due
Updated 10/14/2011 (5013 days ago)
Assigned 10/12/2011 (5015 days ago)
Resolved 10/14/2011 (5013 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
10/14/2011 06:42:00 PM Michael Rubinsky State ⇒ Resolved
 
10/14/2011 06:41:43 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git for this ticket:

Fix GROUP BY fields (Bug: 10635).

  3 files changed, 5 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/6ca8ed0eb406e801b115ffeb76ba775d9d406570
10/12/2011 10:24:36 AM Jan Schneider Assigned to Michael Rubinsky
State ⇒ Assigned
 
10/12/2011 07:54:35 AM thpo+horde (at) dotrc (dot) de Comment #1
Priority ⇒ 1. Low
Patch ⇒ No
Milestone ⇒
Queue ⇒ Ansel
Summary ⇒ missing columns in GROUP BY
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
ansel/lib/Faces/Base.php:getSignatureMatches()

The GROUP BY has to have all select-columns. Please add the missing
  f.gallery_id and f.face_signature.

Here is the related error message:

2011-10-12T09:44:38+02:00 ERR: HORDE [ansel] SQL QUERY FAILED: 
SQLSTATE[42803]: Grouping error: 7 ERROR:  column "f.gallery_id" must 
appear in the GROUP BY clause or be used in an aggregate function
LINE 1: SELECT i.face_id, f.face_name, f.image_id, f.gallery_id, f.f...
                                                    ^
         SELECT i.face_id, f.face_name, f.image_id, f.gallery_id,
           f.face_signature FROM ansel_faces_index i, ansel_faces f WHERE
           f.face_id = i.face_id AND i.face_id <> 1 GROUP BY i.face_id,
           f.face_name, f.image_id HAVING count(i.face_id) > 0 ORDER BY
           count(i.face_id) DESC LIMIT 20 [pid 1455 on line 812 of 
"/usr/share/php/Horde/Db/Adapter/Base.php"]

Saved Queries