Commit abca4cd5 authored by unknown's avatar unknown
Browse files

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
drop table if exists t1;
drop table if exists t1,t2;
create table t1
(
key1 int not null, 
+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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
+180 −172

File changed.

Preview size limit exceeded, changes collapsed.