]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 513585: Don't trigger utf8 conversion just because there are VIEWs present in...
authorjustdave%bugzilla.org <>
Thu, 3 Sep 2009 19:19:30 +0000 (19:19 +0000)
committerjustdave%bugzilla.org <>
Thu, 3 Sep 2009 19:19:30 +0000 (19:19 +0000)
r=mkanat, a=mkanat

Bugzilla/DB/Mysql.pm

index 45e181d3f3dbb96b7a6526f11c893a39bd095cc8..01cd239d74407b7e94817242eb2394c6f6a26a52 100644 (file)
@@ -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 <<EOT;