Actions
Defect #4259
closedActivity feed does not show all changeset activity
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Start date:
2009-11-20
Due date:
% Done:
0%
Estimated time:
Resolution:
Invalid
Affected version:
Description
I think it only shows the first commit from the first day in the time window
I think this may be a bug in postgres
Here's the relevant query:
SELECT "changesets"."id" AS t0_r0 FROM "changesets" LEFT OUTER JOIN "repositories" ON "repositories".id = "changesets".repository_id LEFT OUTER JOIN "projects" ON "projects".id = "repositories".project_id inner join enabled_modules em on em.name = 'repository' and projects.id = em.project_id WHERE --( (1=1 AND changesets.committed_on BETWEEN '2009-10-22' AND '2009-11-21') AND ((projects.id = 1 OR (projects.lft > 1 AND projects.rgt < 2))) AND (projects.status=1 ) --AND projects.id in (SELECT em.project_id FROM enabled_modules em WHERE em.name='repository')
I get the correct number of lines (146 in my database) if I use an inner join to limit the projects to those where the repository is enabled.
If however, I use the subquery that is written by the redmine code, I get only 1 line (commented out here)
I know that pg 8.4 did some optimizations with subqueries
I'm running postgresql-8.4 (8.4.0-2) from debian.
this is with a recent checkout of 0.9pre
Actions