Closed Bug 361140 Opened 18 years ago Closed 18 years ago

Upgrades from versions with enums fail UTF-8 conversion

Categories

(Bugzilla :: Installation & Upgrading, defect)

2.23.3
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: mkanat, Assigned: mkanat)

Details

Attachments

(1 file)

The old enum fields need to be exempted from the UTF-8 table conversion:

DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHARACTER SET binary DEFAULT 'blocker' NOT NULL' at line 2 at Bugzilla/DB/Mysql.pm line 614
        Bugzilla::DB::Mysql::bz_setup_database('Bugzilla::DB::Mysql=HASH(0xaec1978)') called at ./checksetup.pl line 162
Flags: blocking3.0+
Attached patch v1Splinter Review
Okay, I've fixed this here. I also noticed another tiny bug--the ALTER TABLE for the table's default charset was in the wrong place, so it was just being called too many times.
Assignee: installation → mkanat
Status: NEW → ASSIGNED
Attachment #245921 - Flags: review?(bugzilla-mozilla)
Comment on attachment 245921 [details] [diff] [review]
v1

>Index: Bugzilla/DB/Mysql.pm

>+                # Our conversion code doesn't work on enum fields, but they
>+                # all go away later in checksetup anyway.
>+                next if $column->{Type} =~ /enum/i;

Nit: I'd rather see /^enum/i;
Attachment #245921 - Flags: review?(bugzilla-mozilla) → review+
Flags: approval?
Flags: approval? → approval+
Yeah, I wasn't certain that /^enum/ would always work, but I suppose it would. I didn't fix it, though.

Checking in Bugzilla/DB/Mysql.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Mysql.pm,v  <--  Mysql.pm
new revision: 1.47; previous revision: 1.46
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: