From b414efe758211cd96b6f4082cbca5201d5263c24 Mon Sep 17 00:00:00 2001 From: "myk%mozilla.org" <> Date: Sat, 31 Jan 2004 08:49:56 +0000 Subject: 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 --- Bugzilla/FlagType.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Bugzilla/FlagType.pm') 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(); -- cgit v1.2.3-24-g4f1b