]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 127200 - query for cc takes long time
authorbbaetz%student.usyd.edu.au <>
Thu, 4 Apr 2002 12:21:56 +0000 (12:21 +0000)
committerbbaetz%student.usyd.edu.au <>
Thu, 4 Apr 2002 12:21:56 +0000 (12:21 +0000)
r=mattyt, justdave

buglist.cgi

index 5863285cf5dfb916a52e2cbd23ea4e5654d179f5..e4e4bbb56d190b639a0daa1f6aa68b6bf4760a75 100755 (executable)
@@ -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 " .