diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index a8379b3d338..b56e38f3d9c 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -163,6 +163,7 @@ tonu@hundin.mysql.fi tonu@volk.internalnet tonu@x153.internalnet tonu@x3.internalnet +tsmith@build.mysql.com ulli@morbus.(none) venu@hundin.mysql.fi venu@myvenu.com diff --git a/mysql-test/r/ctype_recoding.result b/mysql-test/r/ctype_recoding.result index 7209c86bb31..ed59de87395 100644 --- a/mysql-test/r/ctype_recoding.result +++ b/mysql-test/r/ctype_recoding.result @@ -82,6 +82,13 @@ Field Type Null Key Default Extra SET CHARACTER SET koi8r; DROP TABLE таблица; SET CHARACTER SET default; +SET NAMES UTF8; +CREATE TABLE t1 (t text) DEFAULT CHARSET UTF8; +INSERT INTO t1 (t) VALUES ('x'); +SELECT 1 FROM t1 WHERE CONCAT(_latin1'x') = t; +1 +1 +DROP TABLE t1; SET CHARACTER SET koi8r; CREATE DATABASE тест; USE тест; diff --git a/mysql-test/t/ctype_recoding.test b/mysql-test/t/ctype_recoding.test index 40349da8aa9..8ac22e89c2d 100644 --- a/mysql-test/t/ctype_recoding.test +++ b/mysql-test/t/ctype_recoding.test @@ -56,6 +56,13 @@ SET CHARACTER SET koi8r; DROP TABLE таблица; SET CHARACTER SET default; +# Test for Item_func_conv_charset::fix_fields (bug #3704) +SET NAMES UTF8; +CREATE TABLE t1 (t text) DEFAULT CHARSET UTF8; +INSERT INTO t1 (t) VALUES ('x'); +SELECT 1 FROM t1 WHERE CONCAT(_latin1'x') = t; +DROP TABLE t1; + SET CHARACTER SET koi8r; CREATE DATABASE тест; USE тест; @@ -71,4 +78,3 @@ SET NAMES koi8r; SELECT hex('тест'); SET character_set_connection=cp1251; SELECT hex('тест'); - diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index afbf0b7163e..446d72ac143 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -221,6 +221,7 @@ void Item_bool_func2::fix_length_and_dec() { conv= new Item_func_conv_charset(args[weak],args[strong]->collation.collation); conv->collation.set(args[weak]->collation.derivation); + conv->fix_fields(current_thd, 0, &conv); } args[weak]= conv ? conv : args[weak]; }