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
c58ca9fb
Commit
c58ca9fb
authored
Sep 10, 2001
by
jake%acutex.net
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug 76140 - Adding some more sanity checks.
Patch by Matthew Tuck <matty@chariot.net.au> r= caillon@returnzero.com, jake@acutex.net
parent
2673d244
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
4 deletions
+41
-4
sanitycheck.cgi
sanitycheck.cgi
+41
-4
No files found.
sanitycheck.cgi
View file @
c58ca9fb
...
...
@@ -90,7 +90,8 @@ sub CrossCheck {
Status
(
"... from $t2.$f2"
);
SendSQL
(
"SELECT DISTINCT $f2"
.
(
$key2
?
", $key2"
:
''
)
.
" FROM $t2"
);
SendSQL
(
"SELECT DISTINCT $f2"
.
(
$key2
?
", $key2"
:
''
)
.
" FROM $t2 "
.
"WHERE $f2 IS NOT NULL"
);
while
(
MoreSQLData
())
{
my
(
$value
,
$key
)
=
FetchSQLData
();
if
(
!
$valid
{
$value
}
&&
!
$exceptions
{
$value
})
{
...
...
@@ -142,7 +143,13 @@ CrossCheck("keyworddefs", "id",
CrossCheck
(
"fielddefs"
,
"fieldid"
,
[
"bugs_activity"
,
"fieldid"
]);
CrossCheck
(
"attachments"
,
"attach_id"
,
[
"attachstatuses"
,
"attach_id"
],
[
"bugs_activity"
,
"attach_id"
]);
CrossCheck
(
"attachstatusdefs"
,
"id"
,
[
"attachstatuses"
,
"statusid"
]);
CrossCheck
(
"bugs"
,
"bug_id"
,
[
"bugs_activity"
,
"bug_id"
],
...
...
@@ -152,7 +159,9 @@ CrossCheck("bugs", "bug_id",
[
"dependencies"
,
"blocked"
],
[
"dependencies"
,
"dependson"
],
[
"votes"
,
"bug_id"
],
[
"keywords"
,
"bug_id"
]);
[
"keywords"
,
"bug_id"
],
[
"duplicates"
,
"dupe_of"
,
"dupe"
],
[
"duplicates"
,
"dupe"
,
"dupe_of"
]);
CrossCheck
(
"profiles"
,
"userid"
,
[
"bugs"
,
"reporter"
,
"bug_id"
],
...
...
@@ -163,10 +172,21 @@ CrossCheck("profiles", "userid",
[
"cc"
,
"who"
,
"bug_id"
],
[
"votes"
,
"who"
,
"bug_id"
],
[
"longdescs"
,
"who"
,
"bug_id"
],
[
"logincookies"
,
"userid"
],
[
"namedqueries"
,
"userid"
],
[
"watch"
,
"watcher"
],
[
"watch"
,
"watched"
],
[
"tokens"
,
"userid"
],
[
"components"
,
"initialowner"
,
"value"
],
[
"components"
,
"initialqacontact"
,
"value"
,
[
"0"
]]);
CrossCheck
(
"products"
,
"product"
,
[
"bugs"
,
"product"
,
"bug_id"
],
[
"components"
,
"program"
,
"value"
],
[
"milestones"
,
"product"
,
"value"
],
[
"versions"
,
"program"
,
"value"
],
[
"attachstatusdefs"
,
"product"
,
"name"
]);
Status
(
"Checking groups"
);
SendSQL
(
"select bit from groups where bit != pow(2, round(log(bit) / log(2)))"
);
...
...
@@ -217,11 +237,28 @@ foreach my $ref (@checklist) {
my
(
$product
,
$milestone
)
=
(
@$ref
);
SendSQL
(
"SELECT count(*) FROM milestones WHERE product = "
.
SqlQuote
(
$product
)
.
" AND value = "
.
SqlQuote
(
$milestone
));
if
(
FetchOneColumn
()
!=
1
)
{
Alert
(
"Bug(s) found with inval
u
d product/milestone: $product/$milestone"
);
Alert
(
"Bug(s) found with inval
i
d product/milestone: $product/$milestone"
);
}
}
Status
(
"Checking default milestone/products"
);
@checklist
=
();
SendSQL
(
"select product, defaultmilestone from products"
);
while
(
@row
=
FetchSQLData
())
{
my
@copy
=
@row
;
push
(
@checklist
,
\
@copy
);
}
foreach
my
$ref
(
@checklist
)
{
my
(
$product
,
$milestone
)
=
(
@$ref
);
SendSQL
(
"SELECT count(*) FROM milestones WHERE product = "
.
SqlQuote
(
$product
)
.
" AND value = "
.
SqlQuote
(
$milestone
));
if
(
FetchOneColumn
()
!=
1
)
{
Alert
(
"Product(s) found with invalid default milestone: $product/$milestone"
);
}
}
Status
(
"Checking components/products"
);
...
...
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