summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/DB/Schema.pm15
-rwxr-xr-xchecksetup.pl8
2 files changed, 19 insertions, 4 deletions
diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm
index 801f353d7..610ba4c99 100644
--- a/Bugzilla/DB/Schema.pm
+++ b/Bugzilla/DB/Schema.pm
@@ -224,10 +224,17 @@ use constant ABSTRACT_SCHEMA => {
removed => {TYPE => 'TINYTEXT'},
],
INDEXES => [
- bugs_activity_bugid_idx => ['bug_id'],
- bugs_activity_who_idx => ['who'],
- bugs_activity_bugwhen_idx => ['bug_when'],
- bugs_activity_fieldid_idx => ['fieldid'],
+ bugs_activity_bugid_idx => ['bug_id'],
+ bugs_activity_who_idx => ['who'],
+ bugs_activity_bugwhen_idx => ['bug_when'],
+ bugs_activity_fieldid_idx => ['fieldid'],
+ bugs_activity_bug_field_idx => [qw(bug_id fieldid)],
+ bugs_activity_added_idx => {FIELDS => ['added'],
+ TYPE => 'FULLTEXT'},
+ bugs_activity_removed_idx => {FIELDS => ['removed'],
+ TYPE => 'FULLTEXT'},
+ bugs_activity_added_removed_idx => {FIELDS => [qw(added removed)],
+ TYPE => 'FULLTEXT'},
],
},
diff --git a/checksetup.pl b/checksetup.pl
index 07367f0c3..7533b8dd8 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -3868,6 +3868,14 @@ if (!$dbh->bz_get_field_def('bugs', 'qa_contact')->[2]) { # if it's NOT NULL
WHERE initialqacontact = 0");
}
+# 2005-03-17 Add more indices for bugs_activity -- Bug 286625
+print "Adding more indexes for bugs_activity table.\n";
+$dbh->do("ALTER TABLE bugs_activity ADD INDEX bugs_activity_idfield (bug_id, fieldid)");
+$dbh->do("ALTER TABLE bugs_activity ADD FULLTEXT bugs_activity_added (added)");
+$dbh->do("ALTER TABLE bugs_activity ADD FULLTEXT bugs_activity_removed (removed)");
+$dbh->do("ALTER TABLE bugs_activity ADD FULLTEXT bugs_activity_added_removed (added, removed)");
+
+
} # END LEGACY CHECKS