Last modified: 2011-03-19 03:00:38 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T7620, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 5620 - problems with illegal mix of collations latin1 and utf8
problems with illegal mix of collations latin1 and utf8
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
: utf8
Depends on:
  Show dependency treegraph
Reported: 2006-04-17 13:41 UTC by Konstantin V. Bekreyev
Modified: 2011-03-19 03:00 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Konstantin V. Bekreyev 2006-04-17 13:41:20 UTC
After upgrade from 1.5.8 to 1.6.3 I was got this result when running refreshLinks.php:

A database error has occurred
Query: SELECT page_namespace,page_title,page_id  FROM `mw_page`,`mw_templatelink
s`  WHERE (tl_from=page_id) AND tl_namespace = '0' AND tl_title = 'Заглавная_страница'
Function: Title::getLinksTo
Error: 1267 Illegal mix of collations (latin1_bin,IMPLICIT) and (utf8_general_ci
,COERCIBLE) for operation '=' (localhost)

Problem was resolved with changing tl_title type from

CREATE TABLE /*$wgDBprefix*/templatelinks (
  tl_from int(8) unsigned NOT NULL default '0',

  -- Key to page_namespace/page_title of the target page.
  -- The target page may or may not exist, and due to renames
  -- and deletions may refer to different page records as time
  -- goes by.
  tl_namespace int NOT NULL default '0',
  tl_title varchar(255) binary NOT NULL default '',

  UNIQUE KEY tl_from(tl_from,tl_namespace,tl_title),
  KEY (tl_namespace,tl_title)

) TYPE=InnoDB;


CREATE TABLE `mw_templatelinks` (
  `tl_from` int(8) unsigned NOT NULL default '0',
  `tl_namespace` int(11) NOT NULL default '0',
  `tl_title` varchar(255) character set utf8 collate utf8_bin NOT NULL default '',
  UNIQUE KEY `tl_from` (`tl_from`,`tl_namespace`,`tl_title`),
  KEY `tl_namespace` (`tl_namespace`,`tl_title`)
Comment 1 Brion Vibber 2006-04-17 21:13:25 UTC
Currently we don't have updater scripts for the alternate schemas 
(mysql5, oracle, postgresql). That probably should get fixed; 
otherwise the updaters don't work too well.
Comment 2 Konstantin V. Bekreyev 2006-04-18 05:34:36 UTC
I'm using MySQL version 4.1.18
Comment 3 Konstantin V. Bekreyev 2006-04-18 05:38:47 UTC
this problem with mw_job.job_title and after changing sorting type latin1 to utf8 
problem was resolved.
Comment 4 DieBuche 2010-12-14 08:35:55 UTC
Can this be closed?
Comment 5 Mark A. Hershberger 2011-03-19 03:00:38 UTC
Closing since Konstantin said his problem was resolved.

Note You need to log in before you can comment on or make changes to this bug.