Commit 7f51d138 authored by jocuri%softhome.net's avatar jocuri%softhome.net

Patch for bug 275523: Replace INNER JOIN in flag searches with LEFT JOIN; patch…

Patch for bug 275523: Replace INNER JOIN in flag searches with LEFT JOIN; patch by me, r=joel, a=justdave.
parent c7c879f6
...@@ -730,17 +730,21 @@ sub init { ...@@ -730,17 +730,21 @@ sub init {
} }
}, },
"^requestees.login_name," => sub { "^requestees.login_name," => sub {
push(@supptables, "flags flags_$chartid"); my $flags = "flags_$chartid";
push(@wherepart, "bugs.bug_id = flags_$chartid.bug_id"); push(@supptables, "LEFT JOIN flags $flags " .
push(@supptables, "profiles requestees_$chartid"); "ON bugs.bug_id = $flags.bug_id " .
push(@wherepart, "flags_$chartid.requestee_id = requestees_$chartid.userid"); "AND $flags.is_active = 1");
push(@supptables, "LEFT JOIN profiles requestees_$chartid " .
"ON $flags.requestee_id = requestees_$chartid.userid");
$f = "requestees_$chartid.login_name"; $f = "requestees_$chartid.login_name";
}, },
"^setters.login_name," => sub { "^setters.login_name," => sub {
push(@supptables, "flags flags_$chartid"); my $flags = "flags_$chartid";
push(@wherepart, "bugs.bug_id = flags_$chartid.bug_id"); push(@supptables, "LEFT JOIN flags $flags " .
push(@supptables, "profiles setters_$chartid"); "ON bugs.bug_id = $flags.bug_id " .
push(@wherepart, "flags_$chartid.setter_id = setters_$chartid.userid"); "AND $flags.is_active = 1");
push(@supptables, "LEFT JOIN profiles setters_$chartid " .
"ON $flags.setter_id = setters_$chartid.userid");
$f = "setters_$chartid.login_name"; $f = "setters_$chartid.login_name";
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment