List:Commits« Previous MessageNext Message »
From:kroki Date:November 16 2006 11:26am
Subject:bk commit into 5.0 tree (kroki:1.2284)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of tomash. When tomash 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-11-16 13:25:55+03:00, kroki@stripped +3 -0
  Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug17047
  into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17047
  MERGE: 1.1616.2144.188

  mysql-test/r/func_in.result@stripped, 2006-11-16 13:25:53+03:00, kroki@stripped +1
-0
    Manual merge.  Add "End of 5.0 tests".
    MERGE: 1.12.1.7

  mysql-test/t/func_in.test@stripped, 2006-11-16 13:25:53+03:00, kroki@stripped +4
-0
    Manual merge.  Add "End of 5.0 tests".
    MERGE: 1.14.1.5

  sql/item_cmpfunc.cc@stripped, 2006-11-16 13:22:59+03:00, kroki@stripped +0 -0
    Auto merged
    MERGE: 1.111.23.14

# 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:	kroki
# Host:	moonlight.intranet
# Root:	/home/tomash/src/mysql_ab/mysql-5.0-bug17047/RESYNC

--- 1.223/sql/item_cmpfunc.cc	2006-11-16 13:26:03 +03:00
+++ 1.224/sql/item_cmpfunc.cc	2006-11-16 13:26:03 +03:00
@@ -2465,7 +2465,6 @@ void Item_func_in::fix_length_and_dec()
     if (cmp_type  == STRING_RESULT)
       in_item->cmp_charset= cmp_collation.collation;
   }
-  maybe_null= args[0]->maybe_null;
   max_length= 1;
 }
 

--- 1.28/mysql-test/r/func_in.result	2006-11-16 13:26:03 +03:00
+++ 1.29/mysql-test/r/func_in.result	2006-11-16 13:26:03 +03:00
@@ -202,6 +202,14 @@ select count(*) from t1 where id not in 
 count(*)
 1
 drop table t1;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 SELECT 1 IN (2, NULL);
+SELECT should return NULL.
+SELECT * FROM t1;
+1 IN (2, NULL)
+NULL
+DROP TABLE t1;
+End of 4.1 tests
 CREATE TABLE t1 (a int PRIMARY KEY);
 INSERT INTO t1 VALUES (44), (45), (46);
 SELECT * FROM t1 WHERE a IN (45);
@@ -343,3 +351,4 @@ some_id
 1
 2
 drop table t1;
+End of 5.0 tests

--- 1.22/mysql-test/t/func_in.test	2006-11-16 13:26:03 +03:00
+++ 1.23/mysql-test/t/func_in.test	2006-11-16 13:26:03 +03:00
@@ -109,7 +109,28 @@ select count(*) from t1 where id not in 
 select count(*) from t1 where id not in (1,2);
 drop table t1;
 
-# End of 4.1 tests
+
+#
+# BUG#17047: CHAR() and IN() can return NULL without signaling NULL
+# result
+#
+# The problem was in the IN() function that ignored maybe_null flags
+# of all arguments except the first (the one _before_ the IN
+# keyword, '1' in the test case below).
+#
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1 SELECT 1 IN (2, NULL);
+--echo SELECT should return NULL.
+SELECT * FROM t1;
+
+DROP TABLE t1;
+
+
+--echo End of 4.1 tests
+
 
 #
 # Bug #11885: WHERE condition with NOT IN (one element)          
@@ -232,3 +253,6 @@ select some_id from t1 where some_id not
 select some_id from t1 where some_id not in(-4,-1,-4);
 select some_id from t1 where some_id not in(-4,-1,3423534,2342342);
 drop table t1;
+
+
+--echo End of 5.0 tests
Thread
bk commit into 5.0 tree (kroki:1.2284)kroki16 Nov