diff options
author | mkanat%bugzilla.org <> | 2006-08-26 06:53:12 +0200 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2006-08-26 06:53:12 +0200 |
commit | 40a2b11f6279554debafdc415754a9d28d9fefaa (patch) | |
tree | b62824fe2f7366144444b84aec22b621834c510e /Bugzilla/Install | |
parent | 298bffb5b496415b2f42d705e3d0fb4038a19194 (diff) | |
download | bugzilla-40a2b11f6279554debafdc415754a9d28d9fefaa.tar.gz bugzilla-40a2b11f6279554debafdc415754a9d28d9fefaa.tar.xz |
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 <mkanat@bugzilla.org> r=myk, a=myk
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r-- | Bugzilla/Install/DB.pm | 9 |
1 files changed, 6 insertions, 3 deletions
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 # ################################################################ |