From db895ce72047bbdcfb41639521db3c9169e0d2a0 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 22 Feb 2005 18:00:01 +0300 Subject: [PATCH] Fix for BUG#8578 "Test case 'index_merge_ror' fails on SGI irix" Take into account that bitmap_is_set() may return any non-zero zero value when the bit is set. --- sql/opt_range.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sql/opt_range.cc b/sql/opt_range.cc index ceb9f97bbbc..449aecb29f5 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -2562,7 +2562,7 @@ static double ror_scan_selectivity(const ROR_INTERSECT_INFO *info, char *key_ptr= (char*) key_val; SEL_ARG *sel_arg, *tuple_arg= NULL; bool cur_covered; - bool prev_covered= bitmap_is_set(&info->covered_fields, key_part->fieldnr); + bool prev_covered= (bitmap_is_set(&info->covered_fields, key_part->fieldnr))? 1:0; key_range min_range; key_range max_range; min_range.key= (byte*) key_val; @@ -2575,7 +2575,8 @@ static double ror_scan_selectivity(const ROR_INTERSECT_INFO *info, for(i= 0, sel_arg= scan->sel_arg; sel_arg; i++, sel_arg= sel_arg->next_key_part) { - cur_covered= bitmap_is_set(&info->covered_fields, (key_part + i)->fieldnr); + DBUG_PRINT("info",("sel_arg step")); + cur_covered= (bitmap_is_set(&info->covered_fields, (key_part + i)->fieldnr))? 1:0; if (cur_covered != prev_covered) { /* create (part1val, ..., part{n-1}val) tuple. */