summaryrefslogtreecommitdiffstats
path: root/report.cgi
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-02-26 21:57:37 +0100
committerDave Lawrence <dlawrence@mozilla.com>2013-02-26 21:57:37 +0100
commit5ccff95a61b0c0816fa42da061c298f794daf33d (patch)
tree2b46e295fb29bcd57afd6c8532001290d82ec953 /report.cgi
parent8555ab1f12abd53744d0cb4fe9b3d7a925b10194 (diff)
downloadbugzilla-5ccff95a61b0c0816fa42da061c298f794daf33d.tar.gz
bugzilla-5ccff95a61b0c0816fa42da061c298f794daf33d.tar.xz
Bug 836067 - backport bug 819432 to BMO 4.2 to improve search performance
Diffstat (limited to 'report.cgi')
-rwxr-xr-xreport.cgi8
1 files changed, 3 insertions, 5 deletions
diff --git a/report.cgi b/report.cgi
index 7bff62be9..decbaeeb2 100755
--- a/report.cgi
+++ b/report.cgi
@@ -131,13 +131,12 @@ my $search = new Bugzilla::Search(
params => scalar $params->Vars,
allow_unlimited => 1,
);
-my $query = $search->sql;
$::SIG{TERM} = 'DEFAULT';
$::SIG{PIPE} = 'DEFAULT';
-my $dbh = Bugzilla->switch_to_shadow_db();
-my $results = $dbh->selectall_arrayref($query);
+Bugzilla->switch_to_shadow_db();
+my ($results, $extra_data) = $search->data;
# We have a hash of hashes for the data itself, and a hash to hold the
# row/col/table names.
@@ -224,8 +223,7 @@ if ($width && $formatparam eq "bar") {
$vars->{'width'} = $width if $width;
$vars->{'height'} = $height if $height;
-
-$vars->{'query'} = $query;
+$vars->{'queries'} = $extra_data;
if ($cgi->param('debug')
&& Bugzilla->params->{debug_group}