Last modified: 2011-04-30 01:20:40 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 T23964, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 21964 - math markup results in MySQL error "1267: Illegal mix of collations"
math markup results in MySQL error "1267: Illegal mix of collations"
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.15.x
PC Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-29 10:50 UTC by ross
Modified: 2011-04-30 01:20 UTC (History)
1 user (show)

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


Attachments

Description ross 2009-12-29 10:50:19 UTC
If I try to preview/save a page containing math markup such as "<math>\alpha^2+\beta^2=1</math>", then I get the following error:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: 
SELECT math_outputhash,math_html_conservativeness,math_html,math_mathml FROM `math` WHERE math_inputhash = '�S�@��uo�&Z�f�' LIMIT 1 
from within function "MathRenderer::_recall". MySQL returned error "1267: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_unicode_ci,COERCIBLE) for operation '=' (sql)".

Some people suggested setting $wgDBmysql5 to false which did not work. MySQL lists the math table as having a latin1_swedish_ci collation; all text/varchar columns on that table also have a latin1_swedish_ci collation.

FYI, my MySQL version is 5.0.26

Any help would be appreciated.

Thanks,
Ross
Comment 1 Alex B 2010-01-01 12:45:57 UTC
Try setting the collation to utf8?

ALTER TABLE `tablename` CONVERT TO CHARACTER SET utf8 COLLATE utf8_swedish_ci;
Comment 2 ross 2010-01-01 17:36:57 UTC
That seemed to work - thank you!

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


Navigation
Links