PDA

View Full Version : [Question] Error Number : 1267



Protoss
Mon 13th Oct '08, 3:17pm
I see this is being discussed in another thread but I don't want to hijack that one with my question.

I also had this error (the first in all upgrades from 3.6.8)



Database error in vBulletin 3.7.3:

Invalid SQL:

SELECT forumprefixset.*
FROM forumprefixset AS forumprefixset
INNER JOIN prefixset AS prefixset ON (prefixset.prefixsetid = forumprefixset.prefixsetid)
ORDER BY prefixset.displayorder;

MySQL Error : Illegal mix of collations (latin1_general_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT) for operation '='
Error Number : 1267


I went in and altered a couple of the collations from latin1_swedish_ci to latin1_general_ci
Upgrade proceeded without a problem.

I do notice the the DB contains a mixture throughout. Is there a reason why the error only occurred for this upgrade ?

Should the DB contain the same collation throughout ?

Wayne Luke
Mon 20th Oct '08, 1:10pm
All tables and fields should be the same collation to prevent this error from occuring in the future. It can occur on other queries not just when upgrading if there are mixed collations. When vBulletin creates new tables and fields it will use the default of the database for the collation. This is usually latin1_general_ci unless you change it. You can see instructions on how to change a database's collation settings in the MySQL manual.

Protoss
Tue 21st Oct '08, 7:36pm
Thanks Wayne

I'd already gone back in and updated the DB, this time making sure all collations were latin1_swedish_ci
This is the default collation and was the predominant collation in the DB.
There were actually only 5 collations of latin1_general_ci

No problems since the collations were updated.