Illegal mix of collations error

Illegal mix of collations error

am 13.10.2006 02:30:50 von Elena Korol

------_=_NextPart_001_01C6EE5E.D5FA4609
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

Can someone please help me to figure out a correct combination of the
character sets and collations for 5.0.23 Mysql server funning on XP?
I have a previously working data xml import program that used to run
just fine against older 4.0.14 Mysql server, but with the new mysql
server installation I am getting the following error:


at java.awt.EventDispatchThread.run(EventDispatchThread.java:99 )=20
java.sql.SQLException: Illegal mix of collations
(latin1_swedish_ci,IMPLICIT) an
d (utf8_general_ci,COERCIBLE) for operation '=3D'
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2917)
=20
the following variables are set on Mysql 5.0


mysql> show variables like "%char%";
+--------------------------+-------------------------------- -----+
| Variable_name | Value |
+--------------------------+-------------------------------- -----+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | D:\mysql\share\charsets/ |
+--------------------------+-------------------------------- -----+
=20
The database that I am trying to update is created with
--default-character-set=3Dlatin1 and data is imported with the same
option.
I see that character sets for connection can be altered via :
>SET NAMES 'latin1' COLLATE 'latin1_swedish_ci';

Does it mean that our programmer has to modify the import routine and
add these statements?
Or some other "trick" on the database level will do?

My older server (4.0.14) did have the following variables:

character_set latin1
character_sets latin1 big5 czech euc_kr gb2312 gbk latin1_de sjis
tis620 ujis dec8 dos german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish
hebrew win1251 estonia hungarian koi8_ukr win1251ukr greek win1250 croat
cp1257 latin5
=20
Thank you in advance,
Elena K.

------_=_NextPart_001_01C6EE5E.D5FA4609--