List:Commits« Previous MessageNext Message »
From:eugene Date:January 13 2006 9:13am
Subject:bk commit into 5.0 tree (evgen:1.2012)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of evgen. When evgen 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.2012 06/01/13 12:13:50 evgen@stripped +4 -0
  Merge

  mysql-test/t/select.test
    1.95 06/01/13 12:13:49 evgen@stripped +0 -0
    SCCS merged

  mysql-test/r/select.result
    1.116 06/01/13 12:13:49 evgen@stripped +0 -0
    SCCS merged

  sql/item_cmpfunc.h
    1.118 06/01/13 12:12:43 evgen@stripped +0 -0
    Auto merged

  sql/item_cmpfunc.cc
    1.189 06/01/13 12:12:43 evgen@stripped +0 -0
    Auto merged

# 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:	evgen
# Host:	moonbone.local
# Root:	/work/15633-bug-5.0-mysql/RESYNC

--- 1.117/sql/item_cmpfunc.h	2005-12-09 23:01:15 +03:00
+++ 1.118/sql/item_cmpfunc.h	2006-01-13 12:12:43 +03:00
@@ -1150,6 +1150,11 @@
   are deleted in the end of execution. All changes made to these
   objects need not be registered in the list of changes of the parse
   tree and do not harm PS/SP re-execution.
+
+  Item equal objects are employed only at the optimize phase. Usually they are
+  not supposed to be evaluated.  Yet in some cases we call the method val_int()
+  for them. We have to take care of restricting the predicate such an
+  object represents f1=f2= ...=fn to the projection of known fields fi1=...=fik.
 */
 
 class Item_equal: public Item_bool_func

--- 1.115/mysql-test/r/select.result	2005-12-09 23:01:41 +03:00
+++ 1.116/mysql-test/r/select.result	2006-01-13 12:13:49 +03:00
@@ -3337,6 +3337,19 @@
 1	SIMPLE	t2	const	PRIMARY	PRIMARY	4	const	1	Using index
 1	SIMPLE	t3	const	PRIMARY	PRIMARY	8	const,const	1	
 DROP TABLE t1,t2,t3;
+create table t1 (f1 int unique);
+create table t2 (f2 int unique);
+create table t3 (f3 int unique);
+insert into t1 values(1),(2);
+insert into t2 values(1),(2);
+insert into t3 values(1),(NULL);
+select * from t3 where f3 is null;
+f3
+NULL
+select t2.f2 from t1 left join t2 on f1=f2 join t3 on f1=f3 where f1=1;
+f2
+1
+drop table t1,t2,t3;
 create table t1(f1 char, f2 char not null);
 insert into t1 values(null,'a');
 create table t2 (f2 char not null);

--- 1.94/mysql-test/t/select.test	2005-12-09 23:01:28 +03:00
+++ 1.95/mysql-test/t/select.test	2006-01-13 12:13:49 +03:00
@@ -2807,6 +2807,20 @@
 DROP TABLE t1,t2,t3;
 
 #
+# Bug #15633 Evaluation of Item_equal for non-const table caused wrong
+#            select result
+#
+create table t1 (f1 int unique);
+create table t2 (f2 int unique);
+create table t3 (f3 int unique);
+insert into t1 values(1),(2);
+insert into t2 values(1),(2);
+insert into t3 values(1),(NULL);
+select * from t3 where f3 is null;
+select t2.f2 from t1 left join t2 on f1=f2 join t3 on f1=f3 where f1=1;
+drop table t1,t2,t3;
+
+#
 # Bug#15268 Unchecked null value caused server crash
 #
 create table t1(f1 char, f2 char not null);
Thread
bk commit into 5.0 tree (evgen:1.2012)eugene13 Jan