From: Date: April 24 2004 12:20pm Subject: jdbc v3.0.10+ illegal mix of collations error List-Archive: http://lists.mysql.com/java/7373 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-9" Content-Transfer-Encoding: 7bit Hi, With jdbc drivers v3.0.10 and newer, I get the error: illegal mix of collations (latin5_turkish_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '=' "select * from PFRClass where msClassName = "aa". I connect with this escape string: jdbc:mysql://192.168.0.7:3306/celeber?useUnicode=true&characterEncoding=ISO8 859_9 It is working ok with driver version 3.0.9. I tried different connection strings to replace ISO8859_9 with ISO-8859-9, latin5, etc. without luck. Here I attach some data that might be useful in recognizing the case. Thank you in advance for the help. Best regards, Gokhan Demir Show create table PFRClass; PFRClass | CREATE TABLE `PFRClass` ( `msClassName` varchar(30) NOT NULL default '', `msDescription` varchar(255) NOT NULL default '', `muhType` tinyint(4) NOT NULL default '0', `mbAutoLog` tinyint(1) NOT NULL default '0', `mulSrvUpdCnt` int(11) NOT NULL default '0', PRIMARY KEY (`msClassName`) ) TYPE=InnoDB DEFAULT CHARSET=latin5 show full columns from PFRClass; +---------------+--------------+-------------------+------+-----+---------+- ------+---------------------------------+---------+ | Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment | +---------------+--------------+-------------------+------+-----+---------+- ------+---------------------------------+---------+ | msClassName | varchar(30) | latin5_turkish_ci | | PRI | | | select,insert,update,references | | | msDescription | varchar(255) | latin5_turkish_ci | | | | | select,insert,update,references | | | muhType | tinyint(4) | NULL | | | 0 | | select,insert,update,references | | | mbAutoLog | tinyint(1) | NULL | | | 0 | | select,insert,update,references | | | mulSrvUpdCnt | int(11) | NULL | | | 0 | | select,insert,update,references | | +---------------+--------------+-------------------+------+-----+---------+- ------+---------------------------------+---------+ show create database celeber; +----------+---------------------------------------------------------------- ----+ | Database | Create Database | +----------+---------------------------------------------------------------- ----+ | celeber | CREATE DATABASE `celeber` /*!40100 DEFAULT CHARACTER SET latin5 */ | +----------+---------------------------------------------------------------- ----+ mysql> status -------------- mysql Ver 14.3 Distrib 4.1.1-alpha, for pc-linux (i686) Connection id: 11 Current database: Current user: root@localhost SSL: Not in use Current pager: stdout Using outfile: '' Using delimiter: ; Server version: 4.1.1-alpha-standard Protocol version: 10 Connection: Localhost via UNIX socket Client characterset: latin5_turkish_ci Server characterset: latin5_turkish_ci UNIX socket: /var/lib/mysql/mysql.sock Uptime: 1 hour 9 min 15 sec Threads: 2 Questions: 252 Slow queries: 0 Opens: 146 Flush tables: 1 Open tables: 64 Queries per second avg: 0.061