1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

Change optimizer_use_mrr=auto|disable|force

to be optimizer_switch flags mrr=on|off and mrr_cost_based=on|off.
This commit is contained in:
Sergey Petrunya
2011-06-03 00:25:58 +04:00
parent c44c1bd188
commit 9482e387e6
14 changed files with 64 additions and 72 deletions

View File

@@ -665,8 +665,8 @@ set join_buffer_size=@my_save_join_buffer_size;
#
create table t1 (pk int primary key, b int, c int default 0, index idx(b)) engine=innodb;
insert into t1(pk,b) values (3, 30), (2, 20), (9, 90), (7, 70), (4, 40), (5, 50), (10, 100), (12, 120);
set @my_save_optimizer_use_mrr=@@optimizer_use_mrr;
set optimizer_use_mrr='disable';
set @bug665669_tmp=@@optimizer_switch;
set optimizer_switch='mrr=off';
explain select * from t1 where b > 1000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range idx idx 5 NULL 1 Using index condition
@@ -680,7 +680,7 @@ pk b c
3 30 0
4 40 0
drop table t1;
set optimizer_use_mrr = @my_save_optimizer_use_mrr;
set optimizer_switch = @bug665669_tmp;
#
# Bug#43360 - Server crash with a simple multi-table update
#