List:Internals« Previous MessageNext Message »
From:sinisa Date:January 18 2005 9:13pm
Subject:bk commit into 4.1 tree (Sinisa:1.2137)
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of Sinisa. When Sinisa 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://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet
  1.2137 05/01/18 23:13:29 Sinisa@stripped +3 -0
  fixing wrong value for "examined rows" when UNION's are used.

  sql/sql_union.cc
    1.137 05/01/18 23:13:18 Sinisa@stripped +7 -4
    a patch for the wrong examined rows with UNION's

  mysql-test/t/union.test
    1.78 05/01/18 23:13:18 Sinisa@stripped +4 -0
    test case for the wrong examined rows with UNION's

  mysql-test/r/union.result
    1.84 05/01/18 23:13:18 Sinisa@stripped +16 -0
    result for a test case for the wrong examined rows with UNION's

# 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:	Sinisa
# Host:	sinisa.nasamreza.org
# Root:	/mnt/work/mysql-4.1

--- 1.83/mysql-test/r/union.result	Tue Jan 18 15:41:02 2005
+++ 1.84/mysql-test/r/union.result	Tue Jan 18 23:13:18 2005
@@ -872,6 +872,22 @@
 show status like 'Slow_queries';
 Variable_name	Value
 Slow_queries	3
+flush status;
+select a from t1 where b not in (1,2,3) union select a from t1 where b not in (4,5,6);
+a
+4
+5
+3
+6
+7
+8
+9
+10
+1
+2
+show status like 'Slow_queries';
+Variable_name	Value
+Slow_queries	1
 drop table t1;
 create table t1 (   RID int(11) not null default '0',   IID int(11) not null default '0',    nada varchar(50)  not null,NAME varchar(50) not null,PHONE varchar(50) not null) engine=MyISAM;
 insert into t1 ( RID,IID,nada,NAME,PHONE) values (1, 1, 'main', 'a', '111'), (2, 1, 'main', 'b', '222'), (3, 1, 'main', 'c', '333'), (4, 1, 'main', 'd', '444'), (5, 1, 'main', 'e', '555'), (6, 2, 'main', 'c', '333'), (7, 2, 'main', 'd', '454'), (8, 2, 'main', 'e', '555'), (9, 2, 'main', 'f', '666'), (10, 2, 'main', 'g', '777');

--- 1.77/mysql-test/t/union.test	Thu Nov 18 14:15:41 2004
+++ 1.78/mysql-test/t/union.test	Tue Jan 18 23:13:18 2005
@@ -481,6 +481,10 @@
 show status like 'Slow_queries';
 select count(*) from t1 where a=7 union select count(*) from t1 where b=13;
 show status like 'Slow_queries';
+# additional test for examined rows
+flush status;
+select a from t1 where b not in (1,2,3) union select a from t1 where b not in (4,5,6); 
+show status like 'Slow_queries';
 drop table t1;
 
 #

--- 1.136/sql/sql_union.cc	Fri Dec 31 12:04:30 2004
+++ 1.137/sql/sql_union.cc	Tue Jan 18 23:13:18 2005
@@ -466,11 +466,14 @@
 	}
 	res= sl->join->error;
 	offset_limit_cnt= sl->offset_limit;
-	if (!res && union_result->flush())
+	if (!res)
 	{
-          examined_rows+= thd->examined_row_count;
-	  thd->lex->current_select= lex_select_save;
-	  DBUG_RETURN(1);
+	  examined_rows+= thd->examined_row_count;
+	  if (union_result->flush())
+	  {
+	    thd->lex->current_select= lex_select_save;
+	    DBUG_RETURN(1);
+	  }
 	}
       }
       if (res)
Thread
bk commit into 4.1 tree (Sinisa:1.2137)sinisa18 Jan