MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:holyfoot Date:July 24 2006 5:36pm
Subject:bk commit into 5.1 tree (holyfoot:1.2253) BUG#20835
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of hf. When hf does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-07-24 22:36:25+05:00, holyfoot@stripped +3 -0
  bug #20835 (literal string with =any fails)
  
  Failure happens when we need to convert string constant to table's 
  character set in this query. When we construct Item_func_conv_charset
  in agg_item_charsets, the value of the constant isn's stored in
  the Item_in_optimizer::cache and we get NULL as val_str.
  So the Item_func_conv_charset will always be null_value so the
  condition always fails.

  mysql-test/r/subselect.result@stripped, 2006-07-24 22:30:29+05:00, holyfoot@stripped +6 -0
    result fixed

  mysql-test/t/subselect.test@stripped, 2006-07-24 22:30:29+05:00, holyfoot@stripped +8 -0
    case added

  sql/item_cmpfunc.cc@stripped, 2006-07-24 22:30:29+05:00, holyfoot@stripped +2 -1
    the value can be stored in cache right here if it's ready

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	holyfoot
# Host:	deer.(none)
# Root:	/home/hf/work/mysql-5.1.20835

--- 1.211/sql/item_cmpfunc.cc	2006-07-24 22:36:33 +05:00
+++ 1.212/sql/item_cmpfunc.cc	2006-07-24 22:36:33 +05:00
@@ -871,7 +871,8 @@
   }
   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()) && args[0]->fixed)
+    cache->store(args[0]);
   return 0;
 }
 

--- 1.148/mysql-test/r/subselect.result	2006-07-24 22:36:33 +05:00
+++ 1.149/mysql-test/r/subselect.result	2006-07-24 22:36:33 +05:00
@@ -3204,3 +3204,9 @@
 10000000000000000000
 DROP TABLE t1;
 DROP TABLE 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;

--- 1.119/mysql-test/t/subselect.test	2006-07-24 22:36:33 +05:00
+++ 1.120/mysql-test/t/subselect.test	2006-07-24 22:36:33 +05:00
@@ -2131,3 +2131,11 @@
 
 DROP TABLE t1;
 DROP TABLE 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;
Thread
bk commit into 5.1 tree (holyfoot:1.2253) BUG#20835holyfoot24 Jul