diff options
author | mkanat%kerio.com <> | 2005-04-05 06:52:03 +0200 |
---|---|---|
committer | mkanat%kerio.com <> | 2005-04-05 06:52:03 +0200 |
commit | f5f31fc070588c2075dd13a0fbabe8117e3aad76 (patch) | |
tree | 4a3bb48995143c84fcb8f222b420814e1c6e8eaf /summarize_time.cgi | |
parent | d71d64d9372f1556cec96434179b4cb1f9668e92 (diff) | |
download | bugzilla-f5f31fc070588c2075dd13a0fbabe8117e3aad76.tar.gz bugzilla-f5f31fc070588c2075dd13a0fbabe8117e3aad76.tar.xz |
Bug 286235: Implicit joins should be replaced by explicit joins - installment A
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=joel, a=myk
Diffstat (limited to 'summarize_time.cgi')
-rwxr-xr-x | summarize_time.cgi | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/summarize_time.cgi b/summarize_time.cgi index 077678c2e..67bc255e8 100755 --- a/summarize_time.cgi +++ b/summarize_time.cgi @@ -149,11 +149,12 @@ sub include_tt_details { my $q = qq{SELECT bugs.bug_id, profiles.login_name, bugs.deadline, bugs.estimated_time, bugs.remaining_time - FROM longdescs, bugs, profiles - WHERE longdescs.bug_id in ($buglist) AND - longdescs.bug_id = bugs.bug_id AND - longdescs.who = profiles.userid - $date_bits}; + FROM longdescs + INNER JOIN bugs + ON longdescs.bug_id = bugs.bug_id + INNER JOIN profiles + ON longdescs.who = profiles.userid + WHERE longdescs.bug_id in ($buglist) $date_bits}; my %res = %{$res}; my $sth = $dbh->prepare($q); @@ -203,10 +204,10 @@ sub get_blocker_ids_unique { } sub get_blocker_ids_deep { - my ($bug_id, $ret) = @_;
+ my ($bug_id, $ret) = @_; my $deps = Bugzilla::Bug::EmitDependList("blocked", "dependson", $bug_id); push @{$ret}, @$deps; - foreach $bug_id (@$deps) {
+ foreach $bug_id (@$deps) { get_blocker_ids_deep($bug_id, $ret); } } @@ -232,10 +233,12 @@ sub query_work_by_buglist { longdescs.bug_id, bugs.short_desc, bugs.bug_status - FROM longdescs, profiles, bugs - WHERE longdescs.bug_id IN ($buglist) AND - longdescs.who = profiles.userid AND - bugs.bug_id = longdescs.bug_id + FROM longdescs + INNER JOIN profiles + ON longdescs.who = profiles.userid + INNER JOIN bugs + ON bugs.bug_id = longdescs.bug_id + WHERE longdescs.bug_id IN ($buglist) $date_bits } . $dbh->sql_group_by('longdescs.bug_id, profiles.login_name', 'bugs.short_desc, bugs.bug_status, longdescs.bug_when') . qq{ @@ -296,9 +299,10 @@ sub get_inactive_bugs { # them in %res here and then remove them below. my $q = qq{SELECT DISTINCT bugs.bug_id, bugs.short_desc , bugs.bug_status - FROM longdescs, bugs - WHERE longdescs.bug_id in ($buglist) AND - longdescs.bug_id = bugs.bug_id}; + FROM longdescs + INNER JOIN bugs + ON longdescs.bug_id = bugs.bug_id + WHERE longdescs.bug_id in ($buglist)}; my $sth = $dbh->prepare($q); $sth->execute(); while (my $row = $sth->fetch) { @@ -312,9 +316,10 @@ sub get_inactive_bugs { longdescs.bug_id, bugs.short_desc, bugs.bug_status - FROM longdescs, bugs - WHERE longdescs.bug_id IN ($buglist) AND - bugs.bug_id = longdescs.bug_id + FROM longdescs + INNER JOIN bugs + ON bugs.bug_id = longdescs.bug_id + WHERE longdescs.bug_id IN ($buglist) $date_bits } . $dbh->sql_group_by('longdescs.bug_id', 'bugs.short_desc, bugs.bug_status') . qq{ |