_glossary_get_terms() leads to SQL error if DISTINCT

suit4 - June 12, 2008 - 13:14
Project:Glossary
Version:5.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:NancyDru
Status:closed
Description

I faced some hard to find SQL errors regarding a wrong positioned DISTINCT in a query related to _glossary_get_terms().
(look here http://drupal.org/node/269750)

The query created by the function is not distinct itself, but as far as it utilizes db_rewrite_sql(), there might be other modules injecting the distinct flag, like forum_access does in my case.

There is a simple fix to it.

Patch is attached.

#1

NancyDru - June 14, 2008 - 00:23

The patch didn't attach.

#2

NancyDru - June 14, 2008 - 00:29
Assigned to:Anonymous» NancyDru
Status:needs review» fixed

I only found one occurrence where the db_rewrite_sql key was not the first on in the list.

Fix committed to both branches.

#3

Anonymous (not verified) - June 28, 2008 - 00:35
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

#4

buchanae - July 22, 2008 - 18:28

when will this patch be pushed?

it causes conflicts with other modules, which (IMO) raises the severity. Do you have enough to push a new version?

thanks!
Alex B

#5

NancyDru - July 22, 2008 - 19:32

If it is fixed, then it is the -dev version. I try not to roll new official versions very often because people get upset if I do. I will probably do one soon.

 
 

Drupal is a registered trademark of Dries Buytaert.