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.

Comments

nancydru’s picture

The patch didn't attach.

nancydru’s picture

Assigned: Unassigned » 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.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

buchanae’s picture

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

nancydru’s picture

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.