Roundup Tracker - Issues

Message2290

Author ak-79
Recipients
Date 2006-08-16.08:26:56
Message-id
In-reply-to
reproduce:
roundup-demo tracker with mysql backend (well, any
tracker with mysql will do).

1. create an issue with file in it (skip if you have one)
2. look up the file id
3. search with the default search settings (that is,
with sorting and grouping)
4. modify the resulting url: add
&files=<file-id-from-step-2>
5. mysql fails

Files used just an example of multilink.

Query from step 3 (ok):
select _issue.id,rhs0_._order,_issue._activity 
from _issue LEFT OUTER JOIN _priority as rhs0_ on
_issue._priority=rhs0_.id  
where _issue.__retired__ <> 1 
order by rhs0_._order,_issue._activity desc
()

Query from 4 (fails):
select distinct(_issue.id),rhs0_._order,_issue._activity 
from _issue,issue_files LEFT OUTER JOIN _priority as
rhs0_ on _issue._priority=rhs0_.id  
where _issue.id=issue_files.nodeid and
issue_files.linkid in (%s) and _issue.__retired__ <> 1 
order by rhs0_._order,_issue._activity desc
('1',)

If you don't use grouping, it works again:
select distinct(_issue.id),_issue._activity 
from _issue,issue_files   
where _issue.id=issue_files.nodeid and
issue_files.linkid in (%s) and _issue.__retired__ <> 1 
order by _issue._activity desc
('1',)


Problem with step 4's query is with the 'where'
clause's table order and 'order by'. order by
references _issue, but sees only issue_files and rhs_0
tables (I think, SQL isn't my specialty).
History
Date User Action Args
2009-02-03 14:21:50adminlinkissue1541128 messages
2009-02-03 14:21:50admincreate