diff options
author | mkanat%bugzilla.org <> | 2006-11-20 13:25:09 +0100 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2006-11-20 13:25:09 +0100 |
commit | b4005dc7da0245a2bdeaa0a4d23f3e0565b2cecd (patch) | |
tree | cdb35d940ab6f829c75bc73e7c3604cc9b5059fd /Bugzilla | |
parent | f8238723b7fbbb73fb2239ee5288d54f3535168b (diff) | |
download | bugzilla-b4005dc7da0245a2bdeaa0a4d23f3e0565b2cecd.tar.gz bugzilla-b4005dc7da0245a2bdeaa0a4d23f3e0565b2cecd.tar.xz |
Bug 361140: Upgrades from versions with enums fail UTF-8 conversion
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=bkor, a=justdave
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/DB/Mysql.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Bugzilla/DB/Mysql.pm b/Bugzilla/DB/Mysql.pm index 5a9a01416..4335a1b2f 100644 --- a/Bugzilla/DB/Mysql.pm +++ b/Bugzilla/DB/Mysql.pm @@ -576,6 +576,10 @@ EOT my $info_sth = $self->prepare("SHOW FULL COLUMNS FROM $table"); $info_sth->execute(); while (my $column = $info_sth->fetchrow_hashref) { + # Our conversion code doesn't work on enum fields, but they + # all go away later in checksetup anyway. + next if $column->{Type} =~ /enum/i; + # If this particular column isn't stored in utf-8 if ($column->{Collation} && $column->{Collation} ne 'NULL' @@ -617,8 +621,9 @@ EOT $self->do("ALTER TABLE $table CHANGE COLUMN $name $name $utf8"); } - $self->do("ALTER TABLE $table DEFAULT CHARACTER SET utf8"); } + + $self->do("ALTER TABLE $table DEFAULT CHARACTER SET utf8"); } # foreach my $table (@tables) my $db_name = Bugzilla->localconfig->{db_name}; |