List:Commits« Previous MessageNext Message »
From:Sergey Petrunia Date:January 24 2007 7:23pm
Subject:bk commit into 5.0 tree (sergefp:1.2386) BUG#24127
View as plain text  
Below is the list of changes that have just been committed into a local
5.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@stripped, 2007-01-24 22:23:50+03:00, sergefp@stripped +3 -0
  BUG#24127: merge fixes: If subselect is a union, dont allocate several 
  identical pushed_cond_guards arrays. Allocate only one always.

  mysql-test/r/subselect.result@stripped, 2007-01-24 22:23:47+03:00, sergefp@stripped +3 -3
    BUG#24127: merge

  mysql-test/t/subselect3.test@stripped, 2007-01-24 22:23:47+03:00, sergefp@stripped +0 -1
    BUG#24127: merge

  sql/item_subselect.cc@stripped, 2007-01-24 22:23:47+03:00, sergefp@stripped +2 -2
    BUG#24127: merge fixes: If subselect is a union, dont allocate several 
    identical pushed_cond_guards arrays. Allocate only one always.

# 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:	pylon.mylan
# Root:	/home/psergey/mysql-5.0-bug8804-r12

--- 1.170/mysql-test/r/subselect.result	2007-01-24 22:23:56 +03:00
+++ 1.171/mysql-test/r/subselect.result	2007-01-24 22:23:56 +03:00
@@ -1464,7 +1464,7 @@
 1	PRIMARY	t1	index	NULL	s1	6	NULL	3	Using index
 2	DEPENDENT SUBQUERY	t2	index_subquery	s1	s1	6	func	2	Using index; Full scan on NULL key
 Warnings:
-Note	1003	select `test`.`t1`.`s1` AS `s1`,not(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL having trigcond(<is_not_null_test>(`test`.`t2`.`s1`)))))) AS `s1 NOT IN (SELECT s1 FROM t2)` from `test`.`t1`
+Note	1003	select `test`.`t1`.`s1` AS `s1`,(not(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL having trigcond(<is_not_null_test>(`test`.`t2`.`s1`))))))) AS `s1 NOT IN (SELECT s1 FROM t2)` from `test`.`t1`
 explain extended select s1, s1 = ANY (SELECT s1 FROM t2) from t1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	PRIMARY	t1	index	NULL	s1	6	NULL	3	Using index
@@ -1476,13 +1476,13 @@
 1	PRIMARY	t1	index	NULL	s1	6	NULL	3	Using index
 2	DEPENDENT SUBQUERY	t2	index_subquery	s1	s1	6	func	2	Using index; Full scan on NULL key
 Warnings:
-Note	1003	select `test`.`t1`.`s1` AS `s1`,not(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL having trigcond(<is_not_null_test>(`test`.`t2`.`s1`)))))) AS `s1 <> ALL (SELECT s1 FROM t2)` from `test`.`t1`
+Note	1003	select `test`.`t1`.`s1` AS `s1`,(not(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL having trigcond(<is_not_null_test>(`test`.`t2`.`s1`))))))) AS `s1 <> ALL (SELECT s1 FROM t2)` from `test`.`t1`
 explain extended select s1, s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2') from t1;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	PRIMARY	t1	index	NULL	s1	6	NULL	3	Using index
 2	DEPENDENT SUBQUERY	t2	index_subquery	s1	s1	6	func	2	Using index; Using where; Full scan on NULL key
 Warnings:
-Note	1003	select `test`.`t1`.`s1` AS `s1`,not(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL where (`test`.`t2`.`s1` < _latin1'a2') having trigcond(<is_not_null_test>(`test`.`t2`.`s1`)))))) AS `s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2')` from `test`.`t1`
+Note	1003	select `test`.`t1`.`s1` AS `s1`,(not(<in_optimizer>(`test`.`t1`.`s1`,<exists>(<index_lookup>(<cache>(`test`.`t1`.`s1`) in t2 on s1 checking NULL where (`test`.`t2`.`s1` < _latin1'a2') having trigcond(<is_not_null_test>(`test`.`t2`.`s1`))))))) AS `s1 NOT IN (SELECT s1 FROM t2 WHERE s1 < 'a2')` from `test`.`t1`
 drop table t1,t2;
 create table t2 (a int, b int);
 create table t3 (a int);

--- 1.148/sql/item_subselect.cc	2007-01-24 22:23:56 +03:00
+++ 1.149/sql/item_subselect.cc	2007-01-24 22:23:56 +03:00
@@ -948,7 +948,7 @@
 
     unit->uncacheable|= UNCACHEABLE_DEPENDENT;
   }
-  if (!abort_on_null && left_expr->maybe_null)
+  if (!abort_on_null && left_expr->maybe_null && !pushed_cond_guards)
   {
     if (!(pushed_cond_guards= (bool*)join->thd->alloc(sizeof(bool))))
       DBUG_RETURN(RES_ERROR);
@@ -1163,7 +1163,7 @@
     thd->lex->current_select= current;
     unit->uncacheable|= UNCACHEABLE_DEPENDENT;
 
-    if (!abort_on_null && left_expr->maybe_null)
+    if (!abort_on_null && left_expr->maybe_null && !pushed_cond_guards)
     {
       if (!(pushed_cond_guards= (bool*)join->thd->alloc(sizeof(bool) *
                                                         left_expr->cols())))

--- 1.3/mysql-test/t/subselect3.test	2007-01-24 22:23:56 +03:00
+++ 1.4/mysql-test/t/subselect3.test	2007-01-24 22:23:56 +03:00
@@ -46,7 +46,6 @@
 explain extended
 select a, oref from t2 
 where a in (select max(ie) from t1 where oref=t2.oref group by grp);
-
 select a, oref, a in (
   select max(ie) from t1 where oref=t2.oref group by grp union
   select max(ie) from t1 where oref=t2.oref group by grp
Thread
bk commit into 5.0 tree (sergefp:1.2386) BUG#24127Sergey Petrunia24 Jan