SQL warning message: user warning: Illegal mix of collations....

hg2008 - July 31, 2008 - 22:56
Project:Views Fast Search
Version:5.x-2.0
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hi,

Thanks for creating this module. I was trying to get it running on my test site. I created the view. But, when I try to search for anything, I get the following warning message -

user warning: Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=' query: CREATE TEMPORARY TABLE temp_vfs SELECT n.nid, SUM(1.25 * COALESCE((i.score * nt.search_weight), 0) + 1.75 * COALESCE((i.score * t.count), 0) + 1.25 * COALESCE((POW(2, GREATEST(n.created, n.changed) - 1217191246) * 6.43e-8), 0) + 0.75 * COALESCE((2.0 - 2.0 / (1.0 + c.comment_count * 0.5)), 0)) AS score FROM node n LEFT JOIN search_index i ON n.nid=i.sid LEFT JOIN vfs_ranking_nodetype nt ON nt.type = n.type LEFT JOIN search_total t ON i.word=t.word LEFT JOIN node_comment_statistics c ON c.nid = i.sid WHERE i.fromsid=0 AND i.word IN ('russian') GROUP BY n.nid HAVING COUNT(*)=1 in C:\xampp\htdocs\drupal-5\includes\database.mysql.inc on line 172.

Please can someone help me out? I would really like to use this functionality. Not sure if it helps, but when I had created my drupal database, I had chosen utf8_unicode_ci as the collation. I hope that isn't somehow messing this up.

#1

hg2008 - August 1, 2008 - 17:32
Status:active» fixed

Well, this is fixed for now. Based on http://drupal.org/node/37702#comment-115939, I changed the collation of the (relevant) tables in my database from utf8_general_ci to utf8_unicode_ci. Another related entry is http://drupal.org/node/60409.

Not sure (being a non-techie) but if you are going to use Views fast search, it looks like this issue will always occur if the collation variable of your database tables is not set to utf8_unicode_ci. Maybe some knowledgeable person can confirm this.

#2

Anonymous (not verified) - August 15, 2008 - 17:42
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.