]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix for bug 238800: speeds up editflagtypes.cgi list of flags to tolerable level...
authormyk%mozilla.org <>
Wed, 20 Apr 2005 04:43:37 +0000 (04:43 +0000)
committermyk%mozilla.org <>
Wed, 20 Apr 2005 04:43:37 +0000 (04:43 +0000)
Bugzilla/DB/Schema.pm
checksetup.pl

index 8dce761d82d3a8e7fbad4aa7ca7fedb3a1340bb7..e0b49d85940e4bd117290e73824fe02b90181dcb 100644 (file)
@@ -371,6 +371,7 @@ use constant ABSTRACT_SCHEMA => {
             flags_bug_id_idx       => [qw(bug_id attach_id)],
             flags_setter_id_idx    => ['setter_id'],
             flags_requestee_id_idx => ['requestee_id'],
+            flags_type_id_idx      => ['type_id'],
         ],
     },
 
index 1831bc62de41cd3228bcbf51c3ef9b1160437d20..a28b19a14258d246cbdfbfb72ce4f9d7316b6509 100755 (executable)
@@ -3890,6 +3890,12 @@ if ($dbh->bz_get_field_def('components', 'initialowner')->[2]) { # if NULL
                                'mediumint NOT NULL');
 }
 
+# 2005-03-28 - bug 238800 - index flags.type_id to make editflagtypes.cgi speedy
+if (!defined $dbh->bz_get_index_def('flags','type_id')) {
+    print "Adding index for type_id column in flags table...\n";
+    $dbh->do('ALTER TABLE flags ADD INDEX (type_id)');
+}
+
 } # END LEGACY CHECKS
 
 # If you had to change the --TABLE-- definition in any way, then add your