From: vladd%bugzilla.org <> Date: Sun, 18 Jun 2006 23:54:13 +0000 (+0000) Subject: Patch for bug 341374: fix checksetup failure when database exists with non-Bugzilla... X-Git-Tag: bugzilla-2.20.3~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4004fc77628516aaf403b0d60c65a0e3dd3751df;p=thirdparty%2Fbugzilla.git Patch for bug 341374: fix checksetup failure when database exists with non-Bugzilla table; patch by Olav Vitters , r=vladd, a=justdave. --- diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm index 0e0cc2e1d2..58ac2b7189 100644 --- a/Bugzilla/DB/Mysql.pm +++ b/Bugzilla/DB/Mysql.pm @@ -268,9 +268,9 @@ sub bz_setup_database { # For fixing the inconsistent naming of Schema indexes, # we also check for one of those inconsistently-named indexes. my @tables = $self->bz_table_list_real(); - if ( scalar(@tables) && - ($self->bz_index_info_real('bugs', 'assigned_to') || - $self->bz_index_info_real('flags', 'flags_bidattid_idx')) ) + if (grep($_ eq 'bugs', @tables) + && ($self->bz_index_info_real('bugs', 'assigned_to') + || $self->bz_index_info_real('flags', 'flags_bidattid_idx')) ) { # This is a check unrelated to the indexes, to see if people are