Last modified: 2009-07-31 21:06:22 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 T21085, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 19085 - Database error: Illegal mix of collations
Database error: Illegal mix of collations
Status: RESOLVED DUPLICATE of bug 11812
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: Normal major (vote)
: ---
Assigned To: Markus Krötzsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-05 08:05 UTC by Karsten Hiddemann
Modified: 2009-07-31 21:06 UTC (History)
1 user (show)

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


Attachments

Description Karsten Hiddemann 2009-06-05 08:05:35 UTC
On a Wiki where SMW was recently installed (production site, not finished, but URL available on request) the following error popped up when browsing Special:WantedPages&limit=250&offset=500 for links to non-existing articles:

---
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

    (SQL query hidden)

from within function "SMW::getSMWPageID". MySQL returned error "1267: Illegal mix of collations (latin1_bin,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' (localhost)".
---

This disrupts using normal, non-SMW functionality of MediaWiki, so please propose a fix for this situation.

Thanks,
Karsten
Comment 1 Karsten Hiddemann 2009-06-05 08:08:49 UTC
P.S.:

MediaWiki  	1.14.0
PHP 	5.2.4-2ubuntu5.6 (apache2handler)
MySQL 	5.0.51a-3ubuntu5.4

Semantic MediaWiki (Version 1.4.2)
Semantic Forms (Version 1.6)
Comment 2 Karsten Hiddemann 2009-06-05 09:23:30 UTC
I've fixed this now by running the following SQL query on the wikidb:

ALTER TABLE `smw_atts2` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `smw_conc2` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `smw_conccache` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `smw_ids` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `smw_inst2` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `smw_redi2` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `smw_rels2` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `smw_spec2` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `smw_subs2` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `smw_text2` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;

Two more tables named `hitcounter`and `searchindex` had the same wrong collation, I don't know if they're related to SMW.
Comment 3 David Biesack 2009-06-05 19:19:05 UTC
(In reply to comment #2)
> I've fixed this now by running the following SQL query on the wikidb:
> 
> ALTER TABLE `smw_atts2` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
> ...
> 

I have a similar problem installing SMW/Semantic Forms on MediaWiki 1.11.1
I get

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

    (SQL query hidden)

from within function "SMW::getUnusedPropertySubjects". MySQL returned error "1267: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (latin1_bin,IMPLICIT) for operation '=' (<hostname>)".

I am not a MySQL DBA all. How should I change the SQL above, if at all?
I don't know from the message which table is using latin1_swedish_ci
and which is using latin1_bin.
i.e. do I need to change the SMW tables to use latin1_swedish_ci
instead of utf8/utf8_general_ci ? If so, what ALTER TABLE statement
options? i.e.

ALTER TABLE `smw_atts2` CONVERT TO CHARACTER SET latin1 COLLATE latin1_swedish_ci;
Comment 4 Markus Krötzsch 2009-07-31 21:06:22 UTC

*** This bug has been marked as a duplicate of bug 11812 ***

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


Navigation
Links