Re: Is this by design - compare CHAR BINARY with CHAR

2005-01-13 Thread Gleb Paharenko
Hello. Use CAST(). See: http://dev.mysql.com/doc/mysql/en/Charset-CAST.html Jens Schreiber <[EMAIL PROTECTED]> wrote: > Hello, > > I'm using 4.1.8-standard on linux and get this: > > CREATE TABLE test (field1 CHAR(20) BINARY NOT NULL, field2 CHAR(20) > NOT NULL) TYPE=MyISAM;

Is this by design - compare CHAR BINARY with CHAR

2005-01-13 Thread Jens Schreiber
Hello, I'm using 4.1.8-standard on linux and get this: CREATE TABLE test (field1 CHAR(20) BINARY NOT NULL, field2 CHAR(20) NOT NULL) TYPE=MyISAM; INSERT INTO test VALUES('xxx','yyy') SELECT * FROM test WHERE field1=field2 ERROR 1267 (HY000): Illegal mix of collations (latin1_bin,IMPLICIT) and (l