No idea how it works in MySQL, it doesn't look like valid SQL. Attached is a patch that rationalises JOIN/joincondition order in advanced_forum_unread_posts_in_forum, that works on postgresql 8.1. I haven't tested it in MySQL.
| Comment | File | Size | Author |
|---|---|---|---|
| 0012-Fix-query-to-work-in-postgresql-no-idea-how-it-eve.patch | 1.47 KB | nigel |
Comments
Comment #1
michelleI applied your patch and that may make it not error on postgres but, unfortunately, it doesn't make it actually work. I think I dropped the ball on this one and didn't test it well or, honestly, at all considering it's totally broken. This needs to get fixed before I can do an alpha.
Thanks for catching it,
Michelle
Comment #2
michelleOk, with some help from merlinofchaos, I've rewritten this query. No idea if it works on postgres, sorry, since rewriting it invalidated this patch.
I also changed the setting to have this off by default as the query is really a killer on large forums. On my D5 site with a small number of posts it was fine. On my D6 site with > 100K posts, it totally killed it.
Michelle
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.