From: justdave%bugzilla.org <> Date: Thu, 3 Sep 2009 19:19:30 +0000 (+0000) Subject: Bug 513585: Don't trigger utf8 conversion just because there are VIEWs present in... X-Git-Tag: bugzilla-3.4.2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95b30f4944f8b7cd7170d2f53af47a55c58261e9;p=thirdparty%2Fbugzilla.git Bug 513585: Don't trigger utf8 conversion just because there are VIEWs present in the database. r=mkanat, a=mkanat --- diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm index 45e181d3f3..01cd239d74 100644 --- a/Bugzilla/DB/Mysql.pm +++ b/Bugzilla/DB/Mysql.pm @@ -325,7 +325,7 @@ EOT my @isam_tables; foreach my $row (@$table_status) { my ($name, $type) = @$row; - push(@isam_tables, $name) if $type eq "ISAM"; + push(@isam_tables, $name) if (defined($type) && $type eq "ISAM"); } if(scalar(@isam_tables)) { @@ -370,7 +370,7 @@ EOT my @myisam_tables; foreach my $row (@$table_status) { my ($name, $type) = @$row; - if ($type =~ /^MYISAM$/i + if (defined ($type) && $type =~ /^MYISAM$/i && !grep($_ eq $name, Bugzilla::DB::Schema::Mysql::MYISAM_TABLES)) { push(@myisam_tables, $name) ; @@ -674,7 +674,7 @@ EOT my $utf_table_status = $self->selectall_arrayref("SHOW TABLE STATUS", {Slice=>{}}); $self->_after_table_status([map($_->{Name}, @$utf_table_status)]); - my @non_utf8_tables = grep($_->{Collation} !~ /^utf8/, @$utf_table_status); + my @non_utf8_tables = grep(defined($_->{Collation}) && $_->{Collation} !~ /^utf8/, @$utf_table_status); if (Bugzilla->params->{'utf8'} && scalar @non_utf8_tables) { print <