Commit a7c87234 authored by matty%chariot.net.au's avatar matty%chariot.net.au

Bug 93667: Add comments to uncommented sections of sanitycheck.cgi

parent 7c4b8b32
...@@ -121,6 +121,10 @@ my @checklist; ...@@ -121,6 +121,10 @@ my @checklist;
PutHeader("Bugzilla Sanity Check"); PutHeader("Bugzilla Sanity Check");
###########################################################################
# Fix vote cache
###########################################################################
if (exists $::FORM{'rebuildvotecache'}) { if (exists $::FORM{'rebuildvotecache'}) {
Status("OK, now rebuilding vote cache."); Status("OK, now rebuilding vote cache.");
SendSQL("lock tables bugs write, votes read"); SendSQL("lock tables bugs write, votes read");
...@@ -158,6 +162,10 @@ foreach my $field (("bug_severity", "bug_status", "op_sys", ...@@ -158,6 +162,10 @@ foreach my $field (("bug_severity", "bug_status", "op_sys",
} }
} }
###########################################################################
# Perform referential (cross) checks
###########################################################################
CrossCheck("keyworddefs", "id", CrossCheck("keyworddefs", "id",
["keywords", "keywordid"]); ["keywords", "keywordid"]);
...@@ -207,6 +215,9 @@ CrossCheck("products", "product", ...@@ -207,6 +215,9 @@ CrossCheck("products", "product",
["versions", "program", "value"], ["versions", "program", "value"],
["attachstatusdefs", "product", "name"]); ["attachstatusdefs", "product", "name"]);
###########################################################################
# Perform group checks
###########################################################################
Status("Checking groups"); Status("Checking groups");
SendSQL("select bit from groups where bit != pow(2, round(log(bit) / log(2)))"); SendSQL("select bit from groups where bit != pow(2, round(log(bit) / log(2)))");
...@@ -224,8 +235,9 @@ while (@row = FetchSQLData()) { ...@@ -224,8 +235,9 @@ while (@row = FetchSQLData()) {
Alert("Bad groupset $row[1] found in bug " . BugLink($row[0])); Alert("Bad groupset $row[1] found in bug " . BugLink($row[0]));
} }
###########################################################################
# Perform product specific field checks
###########################################################################
Status("Checking version/products"); Status("Checking version/products");
...@@ -299,7 +311,10 @@ foreach my $ref (@checklist) { ...@@ -299,7 +311,10 @@ foreach my $ref (@checklist) {
} }
} }
###########################################################################
# Perform login checks
###########################################################################
Status("Checking profile logins"); Status("Checking profile logins");
my $emailregexp = Param("emailregexp"); my $emailregexp = Param("emailregexp");
...@@ -312,6 +327,9 @@ while (my ($id,$email) = (FetchSQLData())) { ...@@ -312,6 +327,9 @@ while (my ($id,$email) = (FetchSQLData())) {
Alert "Bad profile email address, id=$id, <$email>." Alert "Bad profile email address, id=$id, <$email>."
} }
###########################################################################
# Perform vote/keyword cache checks
###########################################################################
SendSQL("SELECT bug_id,votes,keywords FROM bugs " . SendSQL("SELECT bug_id,votes,keywords FROM bugs " .
"WHERE votes != 0 OR keywords != ''"); "WHERE votes != 0 OR keywords != ''");
......
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