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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
b4fa09d3
Commit
b4fa09d3
authored
Sep 03, 2001
by
justdave%syndicomm.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug 91808: Additional sanitycheck tests for the duplicates table.
Patch by Matthew Tuck <matty@chariot.net.au> r= jake@acutex.net, caillon@returnzero.com
parent
fe6d2a3a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
7 deletions
+51
-7
sanitycheck.cgi
sanitycheck.cgi
+51
-7
No files found.
sanitycheck.cgi
View file @
b4fa09d3
...
...
@@ -19,6 +19,7 @@
# Rights Reserved.
#
# Contributor(s): Terry Weissman <terry@mozilla.org>
# Matthew Tuck <matty@chariot.net.au>
use
diagnostics
;
use
strict
;
...
...
@@ -109,6 +110,7 @@ sub CrossCheck {
}
my
@badbugs
;
my
@row
;
...
...
@@ -355,24 +357,25 @@ while (1) {
push
(
@list
,
$k
);
}
my
@fixlist
;
@badbugs
=
();
foreach
my
$b
(
keys
(
%
keyword
))
{
if
(
!
exists
$realk
{
$b
}
||
$realk
{
$b
}
ne
$keyword
{
$b
})
{
push
(
@
fixlist
,
$b
);
push
(
@
badbugs
,
$b
);
}
}
foreach
my
$b
(
keys
(
%
realk
))
{
if
(
!
exists
$keyword
{
$b
})
{
push
(
@
fixlist
,
$b
);
push
(
@
badbugs
,
$b
);
}
}
if
(
@
fixlist
)
{
@
fixlist
=
sort
{
$a
<=>
$b
}
@fixlist
;
if
(
@
badbugs
)
{
@
badbugs
=
sort
{
$a
<=>
$b
}
@badbugs
;
Alert
(
"Bug(s) found with incorrect keyword cache: "
.
join
(
', '
,
@
fixlist
));
join
(
', '
,
@
badbugs
));
if
(
exists
$::FORM
{
'rebuildkeywordcache'
})
{
Status
(
"OK, now fixing keyword cache."
);
foreach
my
$b
(
@
fixlist
)
{
foreach
my
$b
(
@
badbugs
)
{
my
$k
=
''
;
if
(
exists
(
$realk
{
$b
}))
{
$k
=
$realk
{
$b
};
...
...
@@ -389,6 +392,47 @@ if (@fixlist) {
}
###########################################################################
# Perform duplicates table checks
###########################################################################
Status
(
"Checking duplicates table"
);
SendSQL
(
"SELECT bugs.bug_id "
.
"FROM bugs INNER JOIN duplicates ON bugs.bug_id = duplicates.dupe "
.
"WHERE bugs.resolution != 'DUPLICATE' "
.
"ORDER BY bugs.bug_id"
);
@badbugs
=
();
while
(
@row
=
FetchSQLData
())
{
my
(
$id
)
=
(
@row
);
push
(
@badbugs
,
$id
);
}
if
(
@badbugs
)
{
Alert
(
"Bug(s) found on duplicates table that are not marked duplicate: "
.
join
(
', '
,
@badbugs
));
}
SendSQL
(
"SELECT bugs.bug_id "
.
"FROM bugs LEFT JOIN duplicates ON bugs.bug_id = duplicates.dupe "
.
"WHERE bugs.resolution = 'DUPLICATE' AND duplicates.dupe IS NULL "
.
"ORDER BY bugs.bug_id"
);
@badbugs
=
();
while
(
@row
=
FetchSQLData
())
{
my
(
$id
)
=
(
@row
);
push
(
@badbugs
,
$id
);
}
if
(
@badbugs
)
{
Alert
(
"Bug(s) found marked resolved duplicate and not on duplicates "
.
"table: "
.
join
(
', '
,
@badbugs
));
}
Status
(
"Sanity check completed."
);
...
...
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