PutHeader("Bugzilla Sanity Check");
+###########################################################################
+# Fix vote cache
+###########################################################################
+
if (exists $::FORM{'rebuildvotecache'}) {
Status("OK, now rebuilding vote cache.");
SendSQL("lock tables bugs write, votes read");
}
}
+###########################################################################
+# Perform referential (cross) checks
+###########################################################################
+
CrossCheck("keyworddefs", "id",
["keywords", "keywordid"]);
["versions", "program", "value"],
["attachstatusdefs", "product", "name"]);
+###########################################################################
+# Perform group checks
+###########################################################################
Status("Checking groups");
SendSQL("select bit from groups where bit != pow(2, round(log(bit) / log(2)))");
Alert("Bad groupset $row[1] found in bug " . BugLink($row[0]));
}
-
-
+###########################################################################
+# Perform product specific field checks
+###########################################################################
Status("Checking version/products");
}
}
-
+###########################################################################
+# Perform login checks
+###########################################################################
+
Status("Checking profile logins");
my $emailregexp = Param("emailregexp");
Alert "Bad profile email address, id=$id, <$email>."
}
+###########################################################################
+# Perform vote/keyword cache checks
+###########################################################################
SendSQL("SELECT bug_id,votes,keywords FROM bugs " .
"WHERE votes != 0 OR keywords != ''");