List:Commits« Previous MessageNext Message »
From:kgeorge Date:October 9 2006 5:53pm
Subject:bk commit into 5.0 tree (gkodinov:1.2297)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of kgeorge. When kgeorge 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, 2006-10-09 19:53:07+04:00, gkodinov@stripped +1 -0
  Merge bk-internal:/home/bk/mysql-5.0-opt
  into  macbook.local:/Users/kgeorge/mysql/work/B22781-5.0-opt
  MERGE: 1.2292.2.1

  sql/sql_select.cc@stripped, 2006-10-09 19:52:58+04:00, gkodinov@stripped +0 -0
    Auto merged
    MERGE: 1.458.1.1

# 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:	gkodinov
# Host:	macbook.local
# Root:	/Users/kgeorge/mysql/work/B22781-5.0-opt/RESYNC

--- 1.459/sql/sql_select.cc	2006-10-09 19:53:21 +04:00
+++ 1.460/sql/sql_select.cc	2006-10-09 19:53:21 +04:00
@@ -1399,7 +1399,8 @@ JOIN::exec()
       simple_order= simple_group;
       skip_sort_order= 0;
     }
-    if (order &&
+    if (order && 
+        (order != group_list || !(select_options & SELECT_BIG_RESULT)) &&
 	(const_tables == tables ||
  	 ((simple_order || skip_sort_order) &&
 	  test_if_skip_sort_order(&join_tab[const_tables], order,
@@ -11995,11 +11996,17 @@ create_sort_index(THD *thd, JOIN *join, 
   table=  tab->table;
   select= tab->select;
 
-  if (test_if_skip_sort_order(tab,order,select_limit,0))
+  /*
+    When there is SQL_BIG_RESULT do not sort using index for GROUP BY,
+    and thus force sorting on disk.
+  */
+  if ((order != join->group_list || 
+       !(join->select_options & SELECT_BIG_RESULT)) &&
+      test_if_skip_sort_order(tab,order,select_limit,0))
     DBUG_RETURN(0);
   if (!(sortorder=make_unireg_sortorder(order,&length)))
     goto err;				/* purecov: inspected */
-  /* It's not fatal if the following alloc fails */
+
   table->sort.io_cache=(IO_CACHE*) my_malloc(sizeof(IO_CACHE),
                                              MYF(MY_WME | MY_ZEROFILL));
   table->status=0;				// May be wrong if quick_select
Thread
bk commit into 5.0 tree (gkodinov:1.2297)kgeorge9 Oct