List:Internals« Previous MessageNext Message »
From:sinisa Date:May 15 2004 1:13pm
Subject:bk commit into 4.1 tree (Sinisa:1.1827)
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.1827 04/05/15 16:13:08 Sinisa@stripped +1 -0
  Optimising UNION ALL (WL 1687)

  sql/sql_union.cc
    1.120 04/05/15 16:13:02 Sinisa@stripped +7 -3
    Optimising UNION ALL (WL 1687)

# 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.119/sql/sql_union.cc	Fri May  7 00:32:42 2004
+++ 1.120/sql/sql_union.cc	Sat May 15 16:13:02 2004
@@ -339,8 +339,8 @@
       item->reset();
       table->file->delete_all_rows();
     }
-    if (union_distinct) // for subselects
-      table->file->extra(HA_EXTRA_CHANGE_KEY_TO_UNIQUE);
+    if (union_distinct && table->file->enable_indexes(HA_KEY_SWITCH_ALL))
+      DBUG_RETURN(1);  // For sub-selects
     for (SELECT_LEX *sl= select_cursor; sl; sl= sl->next_select())
     {
       ha_rows records_at_start= 0;
@@ -392,7 +392,11 @@
 	records_at_start= table->file->records;
 	sl->join->exec();
         if (sl == union_distinct)
-          table->file->extra(HA_EXTRA_CHANGE_KEY_TO_DUP);
+	{
+	  if (table->file->disable_indexes(HA_KEY_SWITCH_ALL))
+	    DBUG_RETURN(1);
+	  table->no_keyread=1;
+	}
 	res= sl->join->error;
 	offset_limit_cnt= sl->offset_limit;
 	if (!res && union_result->flush())
Thread
bk commit into 4.1 tree (Sinisa:1.1827)sinisa15 May