MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Sergey Glukhov Date:October 31 2008 1:12pm
Subject:bzr commit into mysql-5.0-bugteam branch (Sergey.Glukhov:2715)
Bug#20835 Bug#34760
View as plain text  
#At file:///home/gluh/MySQL/mysql-5.0-bug-39541/

 2715 Sergey Glukhov	2008-10-31
      Bug#34760 Character set autodetection appears to fail
      the problem is the same as reported in bug#20835,
      so the fix is backport of bug#20835 patch.
modified:
  mysql-test/r/subselect.result
  mysql-test/t/subselect.test
  sql/item_cmpfunc.cc

per-file messages:
  mysql-test/r/subselect.result
    test result
  mysql-test/t/subselect.test
    test case
  sql/item_cmpfunc.cc
    Bug#34760 Character set autodetection appears to fail
    the problem is the same as reported in bug#20835,
    so the fix is backport of bug#20835 patch.
=== modified file 'mysql-test/r/subselect.result'
--- a/mysql-test/r/subselect.result	2008-07-26 20:44:07 +0000
+++ b/mysql-test/r/subselect.result	2008-10-31 13:08:50 +0000
@@ -4407,4 +4407,10 @@ pk	a
 3	30
 2	20
 DROP TABLE t1,t2;
+CREATE TABLE t1 (s1 char(1));
+INSERT INTO t1 VALUES ('a');
+SELECT * FROM t1 WHERE _utf8'a' = ANY (SELECT s1 FROM t1);
+s1
+a
+DROP TABLE t1;
 End of 5.0 tests.

=== modified file 'mysql-test/t/subselect.test'
--- a/mysql-test/t/subselect.test	2008-07-26 20:44:07 +0000
+++ b/mysql-test/t/subselect.test	2008-10-31 13:08:50 +0000
@@ -3307,5 +3307,13 @@ SELECT * FROM t1
    WHERE EXISTS (SELECT DISTINCT a FROM t2 WHERE t1.a < t2.a ORDER BY b);
 DROP TABLE t1,t2;
 
+#
+# Bug#20835 (literal string with =any values)
+#
+CREATE TABLE t1 (s1 char(1));
+INSERT INTO t1 VALUES ('a');
+SELECT * FROM t1 WHERE _utf8'a' = ANY (SELECT s1 FROM t1);
+DROP TABLE t1;
+
 --echo End of 5.0 tests.
 

=== modified file 'sql/item_cmpfunc.cc'
--- a/sql/item_cmpfunc.cc	2008-09-09 15:05:27 +0000
+++ b/sql/item_cmpfunc.cc	2008-10-31 13:08:50 +0000
@@ -1434,7 +1434,8 @@ bool Item_in_optimizer::fix_left(THD *th
   }
   not_null_tables_cache= args[0]->not_null_tables();
   with_sum_func= args[0]->with_sum_func;
-  const_item_cache= args[0]->const_item();
+  if ((const_item_cache= args[0]->const_item()))
+    cache->store(args[0]);
   return 0;
 }
 

Thread
bzr commit into mysql-5.0-bugteam branch (Sergey.Glukhov:2715)Bug#20835 Bug#34760Sergey Glukhov31 Oct