From 40a2b11f6279554debafdc415754a9d28d9fefaa Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sat, 26 Aug 2006 04:53:12 +0000 Subject: Bug 287170: Need to be able to do fulltext searches on bugs.short_desc even with most tables using InnoDB Patch By Max Kanat-Alexander r=myk, a=myk --- Bugzilla/Install/DB.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Bugzilla/Install') diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm index a7f20625a..bf1fbcccf 100644 --- a/Bugzilla/Install/DB.pm +++ b/Bugzilla/Install/DB.pm @@ -328,9 +328,6 @@ sub update_table_definitions { $dbh->do('UPDATE quips SET userid = NULL WHERE userid = 0'); } - $dbh->bz_add_index('bugs', 'bugs_short_desc_idx', - {TYPE => 'FULLTEXT', FIELDS => [qw(short_desc)]}); - # Right now, we only create the "thetext" index on MySQL. if ($dbh->isa('Bugzilla::DB::Mysql')) { $dbh->bz_add_index('longdescs', 'longdescs_thetext_idx', @@ -482,6 +479,12 @@ sub update_table_definitions { # 2006-08-19 LpSolit@gmail.com - Bug 87795 $dbh->bz_alter_column('tokens', 'userid', {TYPE => 'INT3'}); + my $sd_index = $dbh->bz_index_info('bugs', 'bugs_short_desc_idx'); + if ($sd_index && $sd_index->{TYPE} eq 'FULLTEXT') { + $dbh->bz_drop_index('bugs', 'bugs_short_desc_idx'); + $dbh->bz_add_index('bugs', 'bugs_short_desc_idx', [qw(short_desc)]); + } + ################################################################ # New --TABLE-- changes should go *** A B O V E *** this point # ################################################################ -- cgit v1.2.3-24-g4f1b