Closed Bug 361158 Opened 19 years ago Closed 19 years ago

UTF-8 conversion fails on MySQL 5 (attach_data.id; CHARACTER SET binary NOT NULL)

Categories

(Bugzilla :: Installation & Upgrading, defect)

2.23.3
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: bugzilla-mozilla, Assigned: mkanat)

Details

Attachments

(1 file)

* This is Bugzilla 2.23.3+ on perl 5.8.8 * Running on Linux 2.6.17.3-tmb-desktop-1mdvsmp-i586 #1 SMP Tue Jul 4 23:46:46 CEST 2006 Checking perl modules... Checking for CGI (v2.93) ok: found v3.19 Checking for TimeDate (v2.21) ok: found v2.22 Checking for DBI (v1.41) ok: found v1.52 Checking for PathTools (v0.84) ok: found v3.12 Checking for Template-Toolkit (v2.12) ok: found v2.15 Checking for MIME-Base64 (v3.01) ok: found v3.07 Checking for MIME-tools (v5.406) ok: found v5.420 Checking for Email-Send (v2.00) ok: found v2.171 Checking for Email-MIME-Modifier (any) ok: found v1.440 Checking available perl DBD modules... Checking for DBD-Pg (v1.45) ok: found v1.49 Checking for DBD-mysql (v2.9003) ok: found v3.0008 The following Perl modules are optional: Checking for GD (v1.20) ok: found v2.35 Checking for Template-GD (any) ok: found v1.56 Checking for Chart (v1.0) ok: found v2.4.1 Checking for GDGraph (any) ok: found v1.43 Checking for GDTextUtil (any) ok: found v0.86 Checking for XML-Twig (any) ok: found v3.26 Checking for libwww-perl (any) ok: found v2.033 Checking for PatchReader (v0.9.4) ok: found v0.9.5 Checking for PerlMagick (any) ok: found v6.2.9 Checking for perl-ldap (any) ok: found v0.33 Checking for SOAP-Lite (any) ok: found v0.69 Checking for HTML-Parser (v3.40) ok: found v3.54 Checking for HTML-Scrubber (any) ok: found v0.08 Checking for Email-MIME-Attachment-Stripper (any) ok: found v1.311 Checking for Email-Reply (any) ok: found v1.200 Checking for mod_perl (v1.999022) ok: found v2.000002 Checking for CGI (v3.11) ok: found v3.19 Checking for Apache-DBI (v0.96) ok: found v1.03 Reading ./localconfig... Checking for DBD-mysql (v2.9003) ok: found v3.0008 Checking for MySQL (v4.1.2) ok: found v5.0.27-log WARNING: We are about to convert your table storage format to UTF8. This allows Bugzilla to correctly store and sort international characters. However, if you have any non-UTF-8 data in your database, it ***WILL BE DELETED*** by this process. So, before you continue with checksetup.pl, if you have any non-UTF-8 data (or even if you're not sure) you should press Ctrl-C now to interrupt checksetup.pl, and run contrib/recode.pl to make all the data in your database into UTF-8. You should also back up your database before continuing. If you ever used a version of Bugzilla before 2.22, we STRONGLY recommend that you stop checksetup.pl NOW and run contrib/recode.pl. Continuing in 60 seconds... Converting table storage format to UTF-8. This may take a while. Use of uninitialized value in string ne at Bugzilla/DB/Mysql.pm line 579, <DATA> line 225. Use of uninitialized value in pattern match (m//) at Bugzilla/DB/Mysql.pm line 579, <DATA> line 225. Converting attach_data.id to be stored as UTF-8... ALTER TABLE attach_data CHANGE COLUMN id id mediumint CHARACTER SET binary NOT NULL 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 NOT NULL' at line 2 at Bugzilla/DB/Mysql.pm line 615 Bugzilla::DB::Mysql::bz_setup_database('Bugzilla::DB::Mysql=HASH(0x97bad70)') called at ./checksetup.pl line 162 Note: I added a print statement to see the SQL. From reading the documentation, the SQL should be allowed in MySQL 5.
Flags: blocking3.0?
Ah, the problem seems to be perhaps something with bz_column_info_real -- that error is trying to convert a mediumint, which the code should never try to do.
Assignee: installation → mkanat
Flags: blocking3.0? → blocking3.0+
Attached patch v1Splinter Review
Okay, this fixes it. Turns out that MySQL5 actually returns "undef" to DBD::mysql for those columns, instead of "NULL." Test it out on your end, make sure it fixes your problem.
Attachment #245922 - Flags: review?(bugzilla-mozilla)
Oh, and if it doesn't work, I just need the output of: SHOW FULL COLUMNS FROM profiles as an attachment.
Status: NEW → ASSIGNED
Comment on attachment 245922 [details] [diff] [review] v1 Tested, works.
Attachment #245922 - Flags: review?(bugzilla-mozilla) → review+
Flags: approval?
I had exactly the same problem on my laptop, and the patch worked for me too. Gerv
Summary: UTF-8 conversion fails on MySQL 5 → UTF-8 conversion fails on MySQL 5 (attach_data.id; CHARACTER SET binary NOT NULL)
Flags: approval? → approval+
Checking in Bugzilla/DB/Mysql.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Mysql.pm,v <-- Mysql.pm new revision: 1.46; previous revision: 1.45 done
Status: ASSIGNED → RESOLVED
Closed: 19 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: