From f5f31fc070588c2075dd13a0fbabe8117e3aad76 Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Tue, 5 Apr 2005 04:52:03 +0000 Subject: Bug 286235: Implicit joins should be replaced by explicit joins - installment A Patch By Tomas Kopal r=joel, a=myk --- editflagtypes.cgi | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'editflagtypes.cgi') diff --git a/editflagtypes.cgi b/editflagtypes.cgi index 7936823dc..8ae3a7408 100755 --- a/editflagtypes.cgi +++ b/editflagtypes.cgi @@ -329,12 +329,14 @@ sub update { # the list of inclusions or that have been added to the list of exclusions. 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 = $::FORM{'id'} - AND flags.bug_id = bugs.bug_id AND flags.is_active = 1 AND i.type_id IS NULL "); @@ -342,10 +344,12 @@ sub update { SendSQL(" SELECT flags.id - FROM flags, bugs, flagexclusions AS e + FROM flags + INNER JOIN bugs + ON flags.bug_id = bugs.bug_id + INNER JOIN flagexclusions AS e + ON flags.type_id = e.type_id WHERE flags.type_id = $::FORM{'id'} - AND flags.bug_id = bugs.bug_id - AND flags.type_id = e.type_id AND flags.is_active = 1 AND (bugs.product_id = e.product_id OR e.product_id IS NULL) AND (bugs.component_id = e.component_id OR e.component_id IS NULL) -- cgit v1.2.3-24-g4f1b