List:Internals« Previous MessageNext Message »
From:Sergey Petrunia Date:March 10 2005 11:17pm
Subject:bk commit into 4.0 tree (sergefp:1.2083) BUG#8711
View as plain text  
Below is the list of changes that have just been committed into a local
4.0 repository of psergey. When psergey 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
  1.2083 05/03/11 02:17:03 sergefp@stripped +3 -0
  Fix for BUG#8711: "<=>" may have true value for NULL arguments, so make 
  Item_func_equal::not_null_tables() always return 0.

  sql/item_cmpfunc.h
    1.36 05/03/11 02:17:02 sergefp@stripped +1 -0
    Fix for BUG#8711: "<=>" may have true value for NULL arguments, i.e. it can accept NULL-complemented 
    table rows. This differs from assumptions made in Item_func::not_null_tables(), so add 
    Item_func_equal::not_null_tables().
    Item_func_equal::not_null_tables_cache value doesn't make sense now, but we still let it be
    calculated (and ignore it)

  mysql-test/t/join_outer.test
    1.12 05/03/11 02:17:02 sergefp@stripped +13 -0
    Testcase for BUG#8711

  mysql-test/r/join_outer.result
    1.20 05/03/11 02:17:02 sergefp@stripped +20 -0
    Testcase for BUG#8711

# 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:	sergefp
# Host:	newbox.mylan
# Root:	/home/psergey/mysql-4.0-look

--- 1.35/sql/item_cmpfunc.h	2004-11-26 03:31:20 +03:00
+++ 1.36/sql/item_cmpfunc.h	2005-03-11 02:17:02 +03:00
@@ -78,6 +78,7 @@
   Item_func_equal(Item *a,Item *b) :Item_bool_func2(a,b) { };
   longlong val_int();
   void fix_length_and_dec();
+  table_map not_null_tables() const { return 0; }
   enum Functype functype() const { return EQUAL_FUNC; }
   enum Functype rev_functype() const { return EQUAL_FUNC; }
   cond_result eq_cmp_result() const { return COND_TRUE; }

--- 1.19/mysql-test/r/join_outer.result	2004-08-21 10:45:40 +04:00
+++ 1.20/mysql-test/r/join_outer.result	2005-03-11 02:17:02 +03:00
@@ -684,3 +684,23 @@
 t2	ALL	NULL	NULL	NULL	NULL	2	
 t3	ALL	NULL	NULL	NULL	NULL	2	
 drop table t1, t2, t3;
+create table t1 (
+a int(11),
+b char(10),
+key (a)
+);
+insert into t1 (a) values (1),(2),(3),(4);
+create table t2 (a int);
+select * from t1 left join t2 on t1.a=t2.a where not (t2.a <=> t1.a);
+a	b	a
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+select * from t1 left join t2 on t1.a=t2.a having not (t2.a <=> t1.a);
+a	b	a
+1	NULL	NULL
+2	NULL	NULL
+3	NULL	NULL
+4	NULL	NULL
+drop table t1,t2;

--- 1.11/mysql-test/t/join_outer.test	2003-12-12 20:26:19 +03:00
+++ 1.12/mysql-test/t/join_outer.test	2005-03-11 02:17:02 +03:00
@@ -450,3 +450,16 @@
 explain select * from t1 left join t2  on  b1 = a1 left join t3  on  c1 = a1  and  b1 is null;
 
 drop table t1, t2, t3;
+
+# Test for BUG#8711 '<=>' was considered to be a NULL-rejecting predicate.
+create table t1 (
+  a int(11),
+  b char(10),
+  key (a)
+);
+insert into t1 (a) values (1),(2),(3),(4);
+create table t2 (a int);
+
+select * from t1 left join t2 on t1.a=t2.a where not (t2.a <=> t1.a);
+select * from t1 left join t2 on t1.a=t2.a having not (t2.a <=> t1.a);
+drop table t1,t2;
Thread
bk commit into 4.0 tree (sergefp:1.2083) BUG#8711Sergey Petrunia11 Mar