summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB
diff options
context:
space:
mode:
authorvladd%bugzilla.org <>2006-06-19 01:55:20 +0200
committervladd%bugzilla.org <>2006-06-19 01:55:20 +0200
commit1ae6c5f8f166dff351408f570b56ec2adabbedb9 (patch)
tree89df0a8fad3635687f55cb18e9071aca45018adc /Bugzilla/DB
parent5eb383af33d206b678bab61564c60cfdd4c955ba (diff)
downloadbugzilla-1ae6c5f8f166dff351408f570b56ec2adabbedb9.tar.gz
bugzilla-1ae6c5f8f166dff351408f570b56ec2adabbedb9.tar.xz
Patch for bug 341374: fix checksetup failure when database exists with non-Bugzilla table; patch by Olav Vitters <bugzilla-mozilla@bkor.dhs.org>, r=mkanat, a=justdave.
Diffstat (limited to 'Bugzilla/DB')
-rw-r--r--Bugzilla/DB/Mysql.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm
index 72e32fcde..f0abbe2a0 100644
--- a/Bugzilla/DB/Mysql.pm
+++ b/Bugzilla/DB/Mysql.pm
@@ -264,7 +264,7 @@ sub bz_setup_database {
# http://bugs.mysql.com/bug.php?id=13535
# This is a workaround, a dummy SELECT to reset the LAST_INSERT_ID.
my @tables = $self->bz_table_list_real();
- if (lsearch(\@tables, 'bugs') != -1
+ if (grep($_ eq 'bugs', @tables)
&& $self->bz_column_info_real("bugs", "bug_id"))
{
$self->do('SELECT 1 FROM bugs WHERE bug_id IS NULL');
@@ -285,9 +285,9 @@ sub bz_setup_database {
# has existed at least since Bugzilla 2.8, and probably earlier.
# For fixing the inconsistent naming of Schema indexes,
# we also check for one of those inconsistently-named indexes.
- 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