Upgrades from versions with enums fail UTF-8 conversion

RESOLVED FIXED in Bugzilla 3.0

Status

()

--
critical
RESOLVED FIXED
12 years ago
11 years ago

People

(Reporter: mkanat, Assigned: mkanat)

Tracking

2.23.3
Bugzilla 3.0
Bug Flags:
approval +
blocking3.0 +

Details

Attachments

(1 attachment)

(Assignee)

Description

12 years ago
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
(Assignee)

Updated

12 years ago
Flags: blocking3.0+
(Assignee)

Comment 1

12 years ago
Created attachment 245921 [details] [diff] [review]
v1

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 2

12 years ago
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+

Updated

12 years ago
Flags: approval?
Flags: approval? → approval+
(Assignee)

Comment 3

12 years ago
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
(Assignee)

Updated

12 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.