List:Internals« Previous MessageNext Message »
From:Sergey Petrunia Date:November 25 2005 5:47pm
Subject:bk commit into 5.0 tree (sergefp:1.2008) BUG#15024
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
  1.2008 05/11/25 20:47:22 sergefp@stripped +1 -0
  BUG#15024: get_best_covering_ror_intersect() tries to build ROR-intersection
  by starting with an empty index set and adding indexes to it until it
  becomes covering. If the set becomes covering after adding the first index,
  return NULL and don't try constructing ROR-intersection of one index (which
  caused a crash)

  sql/opt_range.cc
    1.199 05/11/25 20:47:18 sergefp@stripped +4 -4
    BUG#15024: get_best_covering_ror_intersect() tries to build ROR-intersection
    by starting with an empty index set and adding indexes to it until it
    becomes covering. If the set becomes covering after adding the first index,
    return NULL and don't try constructing ROR-intersection of one index (which
    caused a crash)

# 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:	newbox.mylan
# Root:	/home/psergey/mysql-5.0-bug15204

--- 1.198/sql/opt_range.cc	2005-11-20 21:47:00 +03:00
+++ 1.199/sql/opt_range.cc	2005-11-25 20:47:18 +03:00
@@ -3136,10 +3136,10 @@
     /* F=F-covered by first(I) */
     bitmap_union(&covered_fields, &(*ror_scan_mark)->covered_fields);
     all_covered= bitmap_is_subset(&param->needed_fields, &covered_fields);
-  } while (!all_covered && (++ror_scan_mark < ror_scans_end));
-
-  if (!all_covered)
-    DBUG_RETURN(NULL); /* should not happen actually */
+  } while ((++ror_scan_mark < ror_scans_end) && !all_covered);
+  
+  if (!all_covered || (ror_scan_mark - tree->ror_scans) == 1)
+    DBUG_RETURN(NULL);
 
   /*
     Ok, [tree->ror_scans .. ror_scan) holds covering index_intersection with
Thread
bk commit into 5.0 tree (sergefp:1.2008) BUG#15024Sergey Petrunia25 Nov