From ad66df6731224f96d51010c5b7da0e020425899f Mon Sep 17 00:00:00 2001 From: "bbaetz%student.usyd.edu.au" <> Date: Thu, 4 Apr 2002 12:21:56 +0000 Subject: Bug 127200 - query for cc takes long time r=mattyt, justdave --- buglist.cgi | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'buglist.cgi') diff --git a/buglist.cgi b/buglist.cgi index 5863285cf..e4e4bbb56 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -502,9 +502,12 @@ sub GenerateSQL { }, "^cc," => sub { - push(@supptables, - ("LEFT JOIN cc cc_$chartid ON bugs.bug_id = cc_$chartid.bug_id LEFT JOIN profiles map_cc_$chartid ON cc_$chartid.who = map_cc_$chartid.userid")); - $f = "map_cc_$chartid.login_name"; + push(@supptables, "cc cc_$chartid"); + push(@wherepart, "bugs.bug_id = cc_$chartid.bug_id"); + + push(@supptables, "profiles map_cc_$chartid"); + push(@wherepart, "cc_$chartid.who = map_cc_$chartid.userid"); + $f = "map_cc_$chartid.login_name"; }, "^long_?desc,changedby" => sub { @@ -616,7 +619,7 @@ sub GenerateSQL { my $attachtable = "attachments_$chartid"; my $statustable = "attachstatuses_${chartid}_$statusid"; - + push(@supptables, "attachments $attachtable"); my $join = "LEFT JOIN attachstatuses $statustable ON ". "($attachtable.attach_id = $statustable.attach_id AND " . -- cgit v1.2.3-24-g4f1b