Closed Bug 509777 Opened 16 years ago Closed 16 years ago

Migrating the database char set to UTF-8 (contrib/recode.pl) fails with InnoDB type database due to foreign key constraints not handled properly.

Categories

(Bugzilla :: Administration, task)

x86
Windows Vista
task
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 508181

People

(Reporter: mostl33t, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729) Build Identifier: 3.4.1 The utf8 upgrading procedure does not seem to account for FK constraints on bugzilla deployments which use InnoDB MySQL databases. Reproducible: Always Steps to Reproduce: Using the instruction for utf8 option under https://bugs/editparams.cgi, i.e: "Use UTF-8 (Unicode) encoding for all text in Bugzilla. New installations should set this to true to avoid character encoding problems. Existing databases should set this to true only after the data has been converted from existing legacy character encodings to UTF-8, using the contrib/recode.pl script. Note that if you turn this parameter from "off" to "on", you must re-run checksetup.pl immediately afterward." 1) Ran "contrib/recode.pl" as below: 2) Change utf8 from off to on in https://bugs/editparams.cgi 3) Run ./checksetup.pl Actual Results: Running contrib/recode.pl as per step 1 gives: # ./contrib/recode.pl --guess --charset=utf8 Converting attachments.description... Converting attachments.filename... Converting attachments.mimetype... Converting bug_see_also.value... Converting bug_severity.value... Converting bug_status.value... Converting bugs.priority... Converting bugs.keywords... Converting bugs.bug_file_loc... Converting bugs.rep_platform... Converting bugs.short_desc... Converting bugs.status_whiteboard... Converting bugs.bug_severity... Converting bugs.bug_status... Converting bugs.version... Converting bugs.resolution... Converting bugs.target_milestone... Converting bugs.alias... Converting bugs.op_sys... Converting bugs_activity.added... Converting bugs_activity.removed... Converting bugs_fulltext.short_desc... Converting bugs_fulltext.comments... Converting bugs_fulltext.comments_noprivate... Converting classifications.name... Converting classifications.description... Converting components.name... Converting components.description... Converting fielddefs.name... Converting fielddefs.description... Converting flags.status... Converting flagtypes.cc_list... Converting flagtypes.target_type... Converting flagtypes.name... Converting flagtypes.description... Converting groups.userregexp... Converting groups.name... Converting groups.description... Converting groups.icon_url... Converting keyworddefs.name... Converting keyworddefs.description... Converting logincookies.ipaddr... Converting logincookies.cookie... Converting longdescs.thetext... Converting longdescs.extra_data... Converting milestones.value... Converting namedqueries.query... Converting namedqueries.name... Converting op_sys.value... Converting priority.value... Converting products.defaultmilestone... Converting products.milestoneurl... Converting products.name... Converting products.description... Converting profile_setting.setting_name... Converting profile_setting.setting_value... Converting profiles.cryptpassword... Converting profiles.realname... Converting profiles.disabledtext... Converting profiles.login_name... Converting profiles.extern_id... Converting profiles_activity.newvalue... Converting profiles_activity.oldvalue... Converting quips.quip... Converting rep_platform.value... Converting resolution.value... Converting series.query... Converting series.name... Converting series_categories.name... Converting setting.name... Converting setting.default_value... Converting setting.subclass... Converting setting_value.name... Converting setting_value.value... Converting tokens.eventdata... Converting tokens.token... Converting tokens.tokentype... Converting ts_error.message... Converting ts_funcmap.funcname... Converting ts_job.uniqkey... Converting ts_job.coalesce... Converting ts_note.notekey... Converting versions.value... Converting whine_events.subject... Converting whine_events.body... Converting whine_queries.query_name... Converting whine_queries.title... Converting whine_schedules.run_day... Converting whine_schedules.run_time... Step 2 results are as expected, i.e. no errors/anomalies Running ./checksetup.pl as per step 3 gives: Converting table storage format to UTF-8. This may take a while. Converting setting.name to be stored as UTF-8... DBD::mysql::db do failed: Error on rename of './bugs/#sql-32b2_2c4' to './bugs/setting' (errno: 150) [for Statement "ALTER TABLE setting CHANGE COLUMN name name varchar(32) CHARACTER SET binary NOT NULL"] at Bugzilla/DB/Mysql.pm line 767 Bugzilla::DB::Mysql::bz_setup_database('Bugzilla::DB::Mysql=HASH(0xa515b64)') called at ./checksetup.pl line 140 Expected Results: Convert the database character set to UTF-8 without problems. NOTE: Currently the Bugzilla FAQ is missing the procedure for migrating a DB character set to UTF-8, i.e. the description is empty; https://wiki.mozilla.org/Bugzilla:FAQ:Administrative_Questions#How_do_I_migrate_previous_database_to_UTF-8_format.3F
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.