From: bbaetz%student.usyd.edu.au <> Date: Thu, 4 Apr 2002 12:21:56 +0000 (+0000) Subject: Bug 127200 - query for cc takes long time X-Git-Tag: bugzilla-2.16rc1~142 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad66df6731224f96d51010c5b7da0e020425899f;p=thirdparty%2Fbugzilla.git Bug 127200 - query for cc takes long time r=mattyt, justdave --- diff --git a/buglist.cgi b/buglist.cgi index 5863285cf5..e4e4bbb56d 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 " .