Commit abca4cd5 authored by unknown's avatar unknown

Fixes in opt_range.cc: ROR plan choice code

 * Removed unused parameters 
 * Fixed several cost calculation errors in ror_intersect_add
 * Better code structure for ror_intersect_add and get_best_ror_intersect


include/my_bitmap.h:
  Comments added
mysql-test/r/index_merge_innodb.result:
  Test results updated
mysql-test/r/index_merge_ror_cpk.result:
  Test results updated.
mysql-test/t/index_merge_innodb.test:
  Drop all tables after use
sql/opt_range.cc:
  Fixes in ROR plan choice code
  * Removed unused parameters 
  * Fixed several cost calculation errors in ror_intersect_add
  * Better code structure for ror_intersect_add and get_best_ror_intersect
parent cd1715a2
......@@ -24,7 +24,7 @@
typedef struct st_bitmap
{
uchar *bitmap;
uint bitmap_size;
uint bitmap_size; /* number of bytes occupied by the above */
/*
mutex will be acquired for the duration of each bitmap operation if
thread_safe flag in bitmap_init was set. Otherwise, we optimize by not
......
drop table if exists t1;
drop table if exists t1,t2;
create table t1
(
key1 int not null,
......
......@@ -26,7 +26,7 @@ primary key (pk1, pk2)
) engine=innodb;
explain select * from t1 where pk1 = 1 and pk2 < 80 and key1=0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref PRIMARY,key1 PRIMARY 4 const 1 Using where
1 SIMPLE t1 range PRIMARY,key1 PRIMARY 8 NULL 9 Using where
select * from t1 where pk1 = 1 and pk2 < 80 and key1=0;
pk1 pk2 key1 key2 pktail1ok pktail2ok pktail3bad pktail4bad pktail5bad pk2copy badkey filler1 filler2
1 10 0 0 0 0 0 0 0 10 0 filler-data-10 filler2
......
......@@ -4,7 +4,7 @@
-- source include/have_innodb.inc
--disable_warnings
drop table if exists t1;
drop table if exists t1,t2;
--enable_warnings
create table t1
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment