List:Commits« Previous MessageNext Message »
From:igor Date:March 24 2006 9:46pm
Subject:bk commit into 5.1 tree (igor:1.2216)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of igor. When igor 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.2216 06/03/24 12:46:33 igor@stripped +2 -0
  Merge rurik.mysql.com:/home/igor/dev/mysql-5.0-0
  into  rurik.mysql.com:/home/igor/dev/mysql-5.1-0

  sql/item_cmpfunc.cc
    1.198 06/03/24 12:46:26 igor@stripped +0 -0
    Auto merged

  mysql-test/r/join_outer.result
    1.47 06/03/24 12:46:26 igor@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:	igor
# Host:	rurik.mysql.com
# Root:	/home/igor/dev/mysql-5.1-0/RESYNC

--- 1.197/sql/item_cmpfunc.cc	2006-03-09 11:55:25 -08:00
+++ 1.198/sql/item_cmpfunc.cc	2006-03-24 12:46:26 -08:00
@@ -2563,10 +2563,13 @@
 	(item= *li.ref())->check_cols(1))
       return TRUE; /* purecov: inspected */
     used_tables_cache|=     item->used_tables();
-    tmp_table_map=	    item->not_null_tables();
-    not_null_tables_cache|= tmp_table_map;
-    and_tables_cache&=      tmp_table_map;
-    const_item_cache&=      item->const_item();
+    if (!item->const_item())
+    {
+      tmp_table_map= item->not_null_tables();
+      not_null_tables_cache|= tmp_table_map;
+      and_tables_cache&= tmp_table_map;
+      const_item_cache= FALSE;
+    }  
     with_sum_func=	    with_sum_func || item->with_sum_func;
     if (item->maybe_null)
       maybe_null=1;

--- 1.46/mysql-test/r/join_outer.result	2006-02-10 10:34:30 -08:00
+++ 1.47/mysql-test/r/join_outer.result	2006-03-24 12:46:26 -08:00
@@ -1135,3 +1135,22 @@
 1	SIMPLE	t2	ALL	PRIMARY	NULL	NULL	NULL	4	Using where
 1	SIMPLE	t1	eq_ref	PRIMARY	PRIMARY	4	test.t2.a	1	
 DROP TABLE t1,t2;
+CREATE TABLE t1 (id int(11) NOT NULL PRIMARY KEY, name varchar(20),
+INDEX (name)) ENGINE=InnoDB;
+CREATE TABLE t2 (id int(11) NOT NULL PRIMARY KEY, fkey int(11),
+FOREIGN KEY (fkey) REFERENCES t2(id)) ENGINE=InnoDB;
+INSERT INTO t1 VALUES (1,'A1'),(2,'A2'),(3,'B');
+INSERT INTO t2 VALUES (1,1),(2,2),(3,2),(4,3),(5,3);
+EXPLAIN
+SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id 
+WHERE t1.name LIKE 'A%';
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	index	PRIMARY,name	name	23	NULL	3	Using where; Using index
+1	SIMPLE	t2	ref	fkey	fkey	5	test.t1.id	1	Using where; Using index
+EXPLAIN
+SELECT COUNT(*) FROM t2 LEFT JOIN t1 ON t2.fkey = t1.id 
+WHERE t1.name LIKE 'A%' OR FALSE;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	index	PRIMARY,name	name	23	NULL	3	Using where; Using index
+1	SIMPLE	t2	ref	fkey	fkey	5	test.t1.id	1	Using where; Using index
+DROP TABLE t1,t2;
Thread
bk commit into 5.1 tree (igor:1.2216)igor24 Mar