From 80e5fb0f5e07d6bebb4952600a5f662a4199e51f Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" Date: Mon, 20 Nov 2006 04:25:09 +0000 Subject: [PATCH] Bug 361140: Upgrades from versions with enums fail UTF-8 conversion Patch By Max Kanat-Alexander r=bkor, a=justdave git-svn-id: svn://10.0.0.236/trunk@215458 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/webtools/bugzilla/Bugzilla/DB/Mysql.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mozilla/webtools/bugzilla/Bugzilla/DB/Mysql.pm b/mozilla/webtools/bugzilla/Bugzilla/DB/Mysql.pm index 5a9a01416e5..4335a1b2fec 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/DB/Mysql.pm +++ b/mozilla/webtools/bugzilla/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};