Illegal mix of collations (latin1_general_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '<>'
Posted by: Stefan Pantke
Date: March 29, 2007 11:26AM

MySQL in use: 4.1.10a

A PHP WebApp emits this MySQL error message:

Illegal mix of collations (latin1_general_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '<>'

Obviously, the two tables have different collations: latin1_swedish_ci and latin1_general_ci. The respective 'name' columns contain german diacritical characters, which appear to be correctly stored as seen through phpMyAdmin.

If I try to run a join between these tables which uses

k.name <> s.name,

I get the above error. Since I've never seen this problem before, I wonder how to fix it.

Q1: Do we have a best-practice to solve the situation?

Using phpMyAdmin, I changed the collation of the second table to latin1_swedish_ci, but the app emits exactly the same error.

Q2: Does the data stored in a table keeps a charset/encoding, even if I change the collation of the table?

Likely, my questions are not as exact as required to give an good answer. Sorry!

Kind regards,

Stefan

PS: Don't ask, why the default collation is 'latin1_swedish_ci' ;-)



Edited 3 time(s). Last edit at 03/29/2007 11:30AM by Stefan Pantke.

Options: ReplyQuote


Subject
Views
Written By
Posted
Illegal mix of collations (latin1_general_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '<>'
5562
March 29, 2007 11:26AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.