P4DTI issue job002085

TitleP4DTI doesn't check MySQL configured for Unicode
Statusclosed
Priorityessential
Assigned userNick Barnes
OrganizationRavenbrook
DescriptionBugzilla 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.
AnalysisThis 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 foundautomated_test
EvidenceI just know
Observed in2.4.3
Introduced in2.4.3
Test proceduretest_p4dti.py unicode_lifecycle
Created byNick Barnes
Created on2009-04-14 13:02:43
Last modified byNick Barnes
Last modified on2009-04-14 13:27:20
History2009-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.