summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Flag.pm
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-07-02 14:23:27 +0200
committermkanat%kerio.com <>2005-07-02 14:23:27 +0200
commit8ef93208df4b0c83acb4d24772b7af062d36ec78 (patch)
treeeb225a30db99a17be0842c907664069805daba63 /Bugzilla/Flag.pm
parent8f788c282f54e2f92dcae8d83c2397e4c3848ace (diff)
downloadbugzilla-8ef93208df4b0c83acb4d24772b7af062d36ec78.tar.gz
bugzilla-8ef93208df4b0c83acb4d24772b7af062d36ec78.tar.xz
Bug 289042: Implicit joins should be replaced by explicit joins - installment B
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, r=joel, a=justdave
Diffstat (limited to 'Bugzilla/Flag.pm')
-rw-r--r--Bugzilla/Flag.pm22
1 files changed, 12 insertions, 10 deletions
diff --git a/Bugzilla/Flag.pm b/Bugzilla/Flag.pm
index 765ad9afa..464ddffaf 100644
--- a/Bugzilla/Flag.pm
+++ b/Bugzilla/Flag.pm
@@ -112,9 +112,9 @@ my @base_columns =
Which database(s) is the data coming from?
Note: when adding tables to @base_tables, make sure to include the separator
-(i.e. a comma or words like "LEFT OUTER JOIN") before the table name,
-since tables take multiple separators based on the join type, and therefore
-it is not possible to join them later using a single known separator.
+(i.e. words like "LEFT OUTER JOIN") before the table name, since tables take
+multiple separators based on the join type, and therefore it is not possible
+to join them later using a single known separator.
B<Used by get, match, sqlify_criteria and perlify_record>
=back
@@ -400,14 +400,16 @@ sub process {
# no longer valid.
my $flag_ids = $dbh->selectcol_arrayref(
"SELECT flags.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
+ FROM flags
+ INNER JOIN bugs
+ ON flags.bug_id = bugs.bug_id
+ LEFT 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 bugs.bug_id = ?
- AND flags.is_active = 1
- AND i.type_id IS NULL",
+ AND (bugs.component_id = i.component_id OR i.component_id IS NULL)
+ WHERE bugs.bug_id = ?
+ AND flags.is_active = 1
+ AND i.type_id IS NULL",
undef, $bug_id);
foreach my $flag_id (@$flag_ids) { clear($flag_id) }