Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
7e0c4547
Commit
7e0c4547
authored
Jun 29, 2002
by
gerv%gerv.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 151281 - change duplicates.cgi to make one query instead of several…
Bug 151281 - change duplicates.cgi to make one query instead of several thousand. Patch by gerv; r=myk, bbaetz.
parent
d5f30d8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
17 deletions
+15
-17
duplicates.cgi
duplicates.cgi
+15
-17
No files found.
duplicates.cgi
View file @
7e0c4547
...
...
@@ -110,6 +110,9 @@ my $threshold = Param("mostfreqthreshold");
while
(
my
(
$key
,
$value
)
=
each
%
count
)
{
delete
$count
{
$key
}
if
(
$value
<
$threshold
);
# If there's a buglist, restrict the bugs to that list.
delete
$count
{
$key
}
if
$sortvisible
&&
(
lsearch
(
\
@buglist
,
$key
)
==
-
1
);
}
# Try and open the database from "changedsince" days ago
...
...
@@ -135,33 +138,29 @@ if (!tie(%before, 'AnyDBM_File', "data/duplicates/dupes$whenever",
# Don't add CLOSED, and don't add VERIFIED unless they are INVALID or
# WONTFIX. We want to see VERIFIED INVALID and WONTFIX because common
# "bugs" which aren't bugs end up in this state.
my
$
generic_
query
=
"
SELECT component, bug_severity, op_sys, target_milestone,
my
$query
=
"
SELECT
bugs.bug_id,
component, bug_severity, op_sys, target_milestone,
short_desc, bug_status, resolution
FROM bugs
WHERE (bug_status != 'CLOSED')
AND ((bug_status = 'VERIFIED' AND resolution IN ('INVALID', 'WONTFIX'))
OR (bug_status != 'VERIFIED'))
AND "
;
AND
bugs.bug_id IN ("
.
join
(
", "
,
keys
%
count
)
.
")
"
;
# Limit to a single product if requested
$
generic_query
.=
(
" product = "
.
SqlQuote
(
$product
)
.
" AND "
)
if
$product
;
$
query
.=
(
" AND product = "
.
SqlQuote
(
$product
)
)
if
$product
;
SendSQL
(
SelectVisible
(
$query
,
$userid
,
$usergroupset
));
my
@bugs
;
my
@bug_ids
;
my
$loop
=
0
;
foreach
my
$id
(
keys
(
%
count
))
{
# Maximum row count is dealt with in the template.
# If there's a buglist, restrict the bugs to that list.
next
if
$sortvisible
&&
$buglist
[
0
]
&&
(
lsearch
(
\
@buglist
,
$id
)
==
-
1
);
SendSQL
(
SelectVisible
(
"$generic_query bugs.bug_id = $id"
,
$userid
,
$usergroupset
));
next
unless
MoreSQLData
();
my
(
$component
,
$bug_severity
,
$op_sys
,
$target_milestone
,
while
(
MoreSQLData
())
{
# Note: maximum row count is dealt with in the template.
my
(
$id
,
$component
,
$bug_severity
,
$op_sys
,
$target_milestone
,
$short_desc
,
$bug_status
,
$resolution
)
=
FetchSQLData
();
# Limit to open bugs only if requested
...
...
@@ -178,7 +177,6 @@ foreach my $id (keys(%count)) {
bug_status
=>
$bug_status
,
resolution
=>
$resolution
});
push
(
@bug_ids
,
$id
);
$loop
++
;
}
$vars
->
{
'bugs'
}
=
\
@bugs
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment