Issue:Collation

From FollowTheScore
Revision as of 18:44, 26 December 2007 by Ecogeek (talk | contribs) (Collation error on concat, when collation is changed, results in syntax error.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Description: Collation Error
Extension / Version: DPL   /   1.6.3
Type / Status: Bug   /   open

Problem

This is the error I get:

The DPL extension (version 1.6.3) produced a SQL statement which lead to a Database error. The reason may be an internal error of DPL or an error which you made, especially when using DPL options like titleregexp. Query text is: SELECT DISTINCT `lwikipage`.page_namespace as page_namespace,`lwikipage`.page_title as page_title, REPLACE(REPLACE(CONCAT( IF(`lwikipage`.page_namespace=0, , CONCAT(CASE `lwikipage`.page_namespace WHEN 1 THEN 'Talk' WHEN 2 THEN 'User' WHEN 3 THEN 'User_talk' WHEN 4 THEN 'LabWiki' WHEN 5 THEN 'LabWiki_talk' WHEN 6 THEN 'Image' WHEN 7 THEN 'Image_talk' WHEN 8 THEN 'MediaWiki' WHEN 9 THEN 'MediaWiki_talk' WHEN 10 THEN 'Template' WHEN 11 THEN 'Template_talk' WHEN 12 THEN 'Help' WHEN 13 THEN 'Help_talk' WHEN 14 THEN 'Category' WHEN 15 THEN 'Category_talk' END, ':')), `lwikipage`.page_title), '_', ' '),'♣','⣣') as sortkey FROM `lwikitemplatelinks` as tl, `lwikipage` WHERE 1=1 AND `lwikipage`.page_is_redirect=0 AND `lwikipage`.page_id=tl.tl_from AND ((tl.tl_namespace=10 AND tl.tl_title='Todo')) AND `lwikipage`.page_id not in (select `lwikitemplatelinks`.tl_from from `lwikitemplatelinks` where ((`lwikitemplatelinks`.tl_namespace=10 AND `lwikitemplatelinks`.tl_title='Status_Legend')) ) ORDER BY sortkey ASC LIMIT 0, 500

Error message is: Illegal mix of collations (utf8_general_ci,COERCIBLE) and (latin1_bin,IMPLICIT) for operation 'concat' (localhost)

Now, I thought it was a simple issue of editing the file and changing ordercollation. But that just brought me the following:

The DPL extension (version 1.6.3) produced a SQL statement which lead to a Database error. The reason may be an internal error of DPL or an error which you made, especially when using DPL options like titleregexp. Query text is: SELECT DISTINCT `lwikipage`.page_namespace as page_namespace,`lwikipage`.page_title as page_title, REPLACE(REPLACE(CONCAT( IF(`lwikipage`.page_namespace=0, , CONCAT(CASE `lwikipage`.page_namespace WHEN 1 THEN 'Talk' WHEN 2 THEN 'User' WHEN 3 THEN 'User_talk' WHEN 4 THEN 'LabWiki' WHEN 5 THEN 'LabWiki_talk' WHEN 6 THEN 'Image' WHEN 7 THEN 'Image_talk' WHEN 8 THEN 'MediaWiki' WHEN 9 THEN 'MediaWiki_talk' WHEN 10 THEN 'Template' WHEN 11 THEN 'Template_talk' WHEN 12 THEN 'Help' WHEN 13 THEN 'Help_talk' WHEN 14 THEN 'Category' WHEN 15 THEN 'Category_talk' END, ':')), `lwikipage`.page_title), '_', ' '),'♣','⣣') latin1_swedish_ci as sortkey FROM `lwikitemplatelinks` as tl, `lwikipage` WHERE 1=1 AND `lwikipage`.page_is_redirect=0 AND `lwikipage`.page_id=tl.tl_from AND ((tl.tl_namespace=10 AND tl.tl_title='Todo')) AND `lwikipage`.page_id not in (select `lwikitemplatelinks`.tl_from from `lwikitemplatelinks` where ((`lwikitemplatelinks`.tl_namespace=10 AND `lwikitemplatelinks`.tl_title='Status_Legend')) ) ORDER BY sortkey ASC LIMIT 0, 500

Error message is: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as sortkey FROM `lwikitemplatelinks` as tl, `lwikipage` WHERE 1=1 AND `lwikipa' at line 1 (localhost)

I would really appreciate any help.



Reply