diff options
author | myk%mozilla.org <> | 2004-01-31 09:49:56 +0100 |
---|---|---|
committer | myk%mozilla.org <> | 2004-01-31 09:49:56 +0100 |
commit | b414efe758211cd96b6f4082cbca5201d5263c24 (patch) | |
tree | d9ef86a31cb1382e9c5b1a92400f6540efcf4451 | |
parent | 345f9df2f29d90a777051db3d34194ac04b8b637 (diff) | |
download | bugzilla-b414efe758211cd96b6f4082cbca5201d5263c24.tar.gz bugzilla-b414efe758211cd96b6f4082cbca5201d5263c24.tar.xz |
Fix for bug 228917: Makes some flag SQL work with PostgreSQL by using the semantically equivalent INNER JOIN over a comma (,).
Patch by mkanat@kerio.com.
r=myk
a=myk
-rw-r--r-- | Bugzilla/Flag.pm | 6 | ||||
-rw-r--r-- | Bugzilla/FlagType.pm | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm index a766e9e6f..2052f9507 100644 --- a/Bugzilla/Flag.pm +++ b/Bugzilla/Flag.pm @@ -244,12 +244,12 @@ sub process { # no longer valid. &::SendSQL(" SELECT flags.id - FROM flags, bugs LEFT OUTER JOIN flaginclusions i - ON (flags.type_id = i.type_id + FROM (flags INNER JOIN bugs ON flags.bug_id = bugs.bug_id) + LEFT OUTER JOIN flaginclusions i + ON (flags.type_id = i.type_id AND (bugs.product_id = i.product_id OR i.product_id IS NULL) AND (bugs.component_id = i.component_id OR i.component_id IS NULL)) WHERE flags.type_id = $target->{'bug'}->{'id'} - AND flags.bug_id = bugs.bug_id AND i.type_id IS NULL "); clear(&::FetchOneColumn()) while &::MoreSQLData(); diff --git a/Bugzilla/FlagType.pm b/Bugzilla/FlagType.pm index cc825e905..e6bfaf7ef 100644 --- a/Bugzilla/FlagType.pm +++ b/Bugzilla/FlagType.pm @@ -264,12 +264,12 @@ sub normalize { # Check for flags whose product/component is no longer included. &::SendSQL(" SELECT flags.id - FROM flags, bugs LEFT OUTER JOIN flaginclusions AS i - ON (flags.type_id = i.type_id + FROM (flags INNER JOIN bugs ON flags.bug_id = bugs.bug_id) + LEFT OUTER JOIN flaginclusions AS i + ON (flags.type_id = i.type_id AND (bugs.product_id = i.product_id OR i.product_id IS NULL) AND (bugs.component_id = i.component_id OR i.component_id IS NULL)) WHERE flags.type_id IN ($ids) - AND flags.bug_id = bugs.bug_id AND i.type_id IS NULL "); Bugzilla::Flag::clear(&::FetchOneColumn()) while &::MoreSQLData(); |