Ravenbrook / Projects / Perforce Defect Tracking Integration / Issues


P4DTI issue job002085

Title:P4DTI doesn't check MySQL configured for Unicode
Status:closed
Priority:essential
Assigned user:Nick Barnes
Organization:Ravenbrook
Description:Bugzilla supports Unicode data, encoded as UTF-8 in MySQL, and since Bugzilla 2.22 new installations are always UTF-8 encoded. Since P4DTI 2.4.3 we replicate data as Unicode. However, it is possible to run Bugzilla in a non-Unicode mode (for instance, with legacy data from before Bugzilla 2.22). If MySQL is in that mode (e.g. if it has latin1 "character set" - i.e. encoding - on Bugzilla tables and columns) then Unicode replication will fail. The P4DTI should detect that mode and warn that Unicode replication will fail.
Analysis:This is surprisingly hard (and in fact impossible with MySQL prior to 4.1, see job002084). There's no way of saying "show character set for longdescs.thetest" (for instance). Instead, we have to say "show create table longdescs" and parse the per-table default character set ("DEFAULT CHARSET latin1") and per-column specific character set ("`thetext` mediumtext character set latin1 NOT NULL") if present.
How found:automated_test
Evidence:I just know
Observed in:2.4.3
Introduced in:2.4.3
Test procedure:test_p4dti.py unicode_lifecycle
Created by:Nick Barnes
Created on:2009‑04‑14 13:02:43
Last modified by:Nick Barnes
Last modified on:2009‑04‑14 13:27:20
History:2009-04-14 NB Created.

Fixes

Change Effect Date User Description
167771 closed 2009‑04‑14 12:48:37 Nick Barnes Improve MySQL version detection, Unicode configuration detection, Unicode replication testing, and error handling in the presence of Unicode strings.

Generated at 2013-05-20 22:24:25 by $Id: //info.ravenbrook.com/infosys/cgi/issue.cgi#476 $

Copyright © Ravenbrook Limited. This document is provided "as is", without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this document. You may make and distribute verbatim copies of this document provided that you do not charge a fee for this document or for its distribution.

Ravenbrook / Projects / Perforce Defect Tracking Integration / Issues