List:Internals« Previous MessageNext Message »
From:eugene Date:November 22 2005 3:46pm
Subject:bk commit into 5.0 tree (evgen:1.1989)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of evgen. When evgen 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.1989 05/11/22 17:46:01 evgen@stripped +1 -0
  Merge epotemkin@stripped:/home/bk/mysql-5.0
  into moonbone.local:/work/13293-bug-5.0-mysql

  sql/opt_range.cc
    1.199 05/11/22 17:46:00 evgen@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:	evgen
# Host:	moonbone.local
# Root:	/work/13293-bug-5.0-mysql/RESYNC

--- 1.198/sql/opt_range.cc	2005-11-20 21:47:00 +03:00
+++ 1.199/sql/opt_range.cc	2005-11-22 17:46:00 +03:00
@@ -6923,9 +6923,9 @@
     SA5. The select list in DISTINCT queries should not contain expressions.
     GA1. If Q has a GROUP BY clause, then GA is a prefix of I. That is, if
          G_i = A_j => i = j.
-    GA2. If Q has a DISTINCT clause, then there is a permutation of SA that
-         forms a prefix of I. This permutation is used as the GROUP clause
-         when the DISTINCT query is converted to a GROUP query.
+    GA2. If Q has a DISTINCT clause, then there is a permutation of SA.
+         This permutation is used as the GROUP clause when the DISTINCT
+         query is converted to a GROUP query.
     GA3. The attributes in GA may participate in arbitrary predicates, divided
          into two groups:
          - RNG(G_1,...,G_q ; where q <= k) is a range condition over the
@@ -7215,6 +7215,13 @@
         cur_used_key_parts.set_bit(key_part_nr);
         ++cur_group_key_parts;
       }
+      /*
+        For loose index scan being applicable for distinct all fields
+        should be covered by index and all parts of index should be used.
+      */
+      if (cur_group_key_parts != join->fields_list.elements ||
+          cur_group_key_parts != cur_index_info->key_parts)
+        goto next_index;
     }
     else
       DBUG_ASSERT(FALSE);
Thread
bk commit into 5.0 tree (evgen:1.1989)eugene24 Nov