Merge MWL #247 from mariadb 5.3 -> mariadb 5.5.
This commit is contained in:
commit
8bc5045ea3
8997
mysql-test/include/dbt3_s001.inc
Normal file
8997
mysql-test/include/dbt3_s001.inc
Normal file
File diff suppressed because it is too large
Load Diff
728
mysql-test/r/innodb_ext_key.result
Normal file
728
mysql-test/r/innodb_ext_key.result
Normal file
@ -0,0 +1,728 @@
|
||||
DROP TABLE IF EXISTS t1,t2,t3,t4;
|
||||
DROP DATABASE IF EXISTS dbt3_s001;
|
||||
SET SESSION STORAGE_ENGINE='InnoDB';
|
||||
CREATE DATABASE dbt3_s001;
|
||||
use dbt3_s001;
|
||||
set @save_ext_key_optimizer_switch=@@optimizer_switch;
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 const 5 Using where
|
||||
flush status;
|
||||
select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
|
||||
count(*)
|
||||
1
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 1
|
||||
Handler_read_last 0
|
||||
Handler_read_next 5
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 8 const,const 1 Using index
|
||||
flush status;
|
||||
select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
|
||||
count(*)
|
||||
1
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 1
|
||||
Handler_read_last 0
|
||||
Handler_read_next 1
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select count(*) from lineitem
|
||||
where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE lineitem const PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 8 const,const 1
|
||||
flush status;
|
||||
select count(*) from lineitem
|
||||
where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01';
|
||||
count(*)
|
||||
1
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 1
|
||||
Handler_read_last 0
|
||||
Handler_read_next 0
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select count(*) from lineitem
|
||||
where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE lineitem const PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 8 const,const 1
|
||||
flush status;
|
||||
select count(*) from lineitem
|
||||
where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01';
|
||||
count(*)
|
||||
1
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 1
|
||||
Handler_read_last 0
|
||||
Handler_read_next 0
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select count(*) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 4 const 6 Using where; Using index
|
||||
flush status;
|
||||
select count(*) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000;
|
||||
count(*)
|
||||
1
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 1
|
||||
Handler_read_last 0
|
||||
Handler_read_next 6
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select count(*) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE lineitem range PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 8 NULL 1 Using where; Using index
|
||||
flush status;
|
||||
select count(*) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000;
|
||||
count(*)
|
||||
1
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 1
|
||||
Handler_read_last 0
|
||||
Handler_read_next 1
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select l_orderkey, l_linenumber from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 4 const 6 Using where; Using index
|
||||
flush status;
|
||||
select l_orderkey, l_linenumber from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
|
||||
l_orderkey l_linenumber
|
||||
1088 3
|
||||
1217 1
|
||||
1221 3
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 1
|
||||
Handler_read_last 0
|
||||
Handler_read_next 6
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select l_orderkey, l_linenumber from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE lineitem range PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 8 NULL 3 Using where; Using index
|
||||
flush status;
|
||||
select l_orderkey, l_linenumber from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
|
||||
l_orderkey l_linenumber
|
||||
1088 3
|
||||
1217 1
|
||||
1221 3
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 1
|
||||
Handler_read_last 0
|
||||
Handler_read_next 3
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select min(l_orderkey) from lineitem where l_shipdate='1992-07-01';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE lineitem ref i_l_shipdate i_l_shipdate 4 const 6 Using index
|
||||
flush status;
|
||||
select min(l_orderkey) from lineitem where l_shipdate='1992-07-01';
|
||||
min(l_orderkey)
|
||||
130
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 1
|
||||
Handler_read_last 0
|
||||
Handler_read_next 6
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select min(l_orderkey) from lineitem where l_shipdate='1992-07-01';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||
flush status;
|
||||
select min(l_orderkey) from lineitem where l_shipdate='1992-07-01';
|
||||
min(l_orderkey)
|
||||
130
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 1
|
||||
Handler_read_last 0
|
||||
Handler_read_next 0
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select min(l_orderkey) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate 4 const 6 Using where; Using index
|
||||
flush status;
|
||||
select min(l_orderkey) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
|
||||
min(l_orderkey)
|
||||
1088
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 1
|
||||
Handler_read_last 0
|
||||
Handler_read_next 6
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select min(l_orderkey) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||
flush status;
|
||||
select min(l_orderkey) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
|
||||
min(l_orderkey)
|
||||
1088
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 1
|
||||
Handler_read_last 0
|
||||
Handler_read_next 0
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select max(l_linenumber) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey=130;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE lineitem ref PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity PRIMARY 4 const 5 Using where
|
||||
flush status;
|
||||
select max(l_linenumber) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey=130;
|
||||
max(l_linenumber)
|
||||
2
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 1
|
||||
Handler_read_last 0
|
||||
Handler_read_next 5
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select max(l_linenumber) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey=130;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||
flush status;
|
||||
select max(l_linenumber) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey=130;
|
||||
max(l_linenumber)
|
||||
2
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 1
|
||||
Handler_read_last 0
|
||||
Handler_read_next 0
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select l_orderkey, l_linenumber
|
||||
from lineitem use index (i_l_shipdate, i_l_receiptdate)
|
||||
where l_shipdate='1992-07-01' and l_orderkey=130
|
||||
or l_receiptdate='1992-07-01' and l_orderkey=5603;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE lineitem index_merge i_l_shipdate,i_l_receiptdate i_l_shipdate,i_l_receiptdate 4,4 NULL 9 Using union(i_l_shipdate,i_l_receiptdate); Using where
|
||||
flush status;
|
||||
select l_orderkey, l_linenumber
|
||||
from lineitem use index (i_l_shipdate, i_l_receiptdate)
|
||||
where l_shipdate='1992-07-01' and l_orderkey=130
|
||||
or l_receiptdate='1992-07-01' and l_orderkey=5603;
|
||||
l_orderkey l_linenumber
|
||||
130 2
|
||||
5603 2
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 2
|
||||
Handler_read_last 0
|
||||
Handler_read_next 9
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 9
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select l_orderkey, l_linenumber
|
||||
from lineitem use index (i_l_shipdate, i_l_receiptdate)
|
||||
where l_shipdate='1992-07-01' and l_orderkey=130
|
||||
or l_receiptdate='1992-07-01' and l_orderkey=5603;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE lineitem index_merge i_l_shipdate,i_l_receiptdate i_l_shipdate,i_l_receiptdate 8,8 NULL 2 Using sort_union(i_l_shipdate,i_l_receiptdate); Using where
|
||||
flush status;
|
||||
select l_orderkey, l_linenumber
|
||||
from lineitem use index (i_l_shipdate, i_l_receiptdate)
|
||||
where l_shipdate='1992-07-01' and l_orderkey=130
|
||||
or l_receiptdate='1992-07-01' and l_orderkey=5603;
|
||||
l_orderkey l_linenumber
|
||||
130 2
|
||||
5603 2
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 2
|
||||
Handler_read_last 0
|
||||
Handler_read_next 2
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 2
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select l_orderkey, l_linenumber
|
||||
from lineitem use index (i_l_shipdate, i_l_receiptdate)
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
|
||||
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE lineitem index_merge i_l_shipdate,i_l_receiptdate i_l_shipdate,i_l_receiptdate 4,4 NULL 9 Using union(i_l_shipdate,i_l_receiptdate); Using where
|
||||
flush status;
|
||||
select l_orderkey, l_linenumber
|
||||
from lineitem use index (i_l_shipdate, i_l_receiptdate)
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
|
||||
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
|
||||
l_orderkey l_linenumber
|
||||
130 2
|
||||
5603 2
|
||||
5959 3
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 2
|
||||
Handler_read_last 0
|
||||
Handler_read_next 9
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 9
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select l_orderkey, l_linenumber
|
||||
from lineitem use index (i_l_shipdate, i_l_receiptdate)
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
|
||||
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE lineitem index_merge i_l_shipdate,i_l_receiptdate i_l_shipdate,i_l_receiptdate 8,8 NULL 3 Using sort_union(i_l_shipdate,i_l_receiptdate); Using where
|
||||
flush status;
|
||||
select l_orderkey, l_linenumber
|
||||
from lineitem use index (i_l_shipdate, i_l_receiptdate)
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
|
||||
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
|
||||
l_orderkey l_linenumber
|
||||
130 2
|
||||
5603 2
|
||||
5959 3
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 2
|
||||
Handler_read_last 0
|
||||
Handler_read_next 3
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 3
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select l_orderkey, l_linenumber from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
|
||||
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE lineitem index_merge PRIMARY,i_l_shipdate,i_l_receiptdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate,PRIMARY,i_l_receiptdate,PRIMARY 4,4,4,4 NULL 2 Using union(intersect(i_l_shipdate,PRIMARY),intersect(i_l_receiptdate,PRIMARY)); Using where
|
||||
flush status;
|
||||
select l_orderkey, l_linenumber from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
|
||||
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
|
||||
l_orderkey l_linenumber
|
||||
130 2
|
||||
5603 2
|
||||
5959 3
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 2
|
||||
Handler_read_last 0
|
||||
Handler_read_next 9
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 3
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select l_orderkey, l_linenumber from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
|
||||
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE lineitem index_merge PRIMARY,i_l_shipdate,i_l_receiptdate,i_l_orderkey,i_l_orderkey_quantity i_l_shipdate,i_l_receiptdate 8,8 NULL 3 Using sort_union(i_l_shipdate,i_l_receiptdate); Using where
|
||||
flush status;
|
||||
select l_orderkey, l_linenumber from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
|
||||
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
|
||||
l_orderkey l_linenumber
|
||||
130 2
|
||||
5603 2
|
||||
5959 3
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 2
|
||||
Handler_read_last 0
|
||||
Handler_read_next 3
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 3
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select max(l_orderkey) from lineitem
|
||||
where l_partkey between 1 and 10 group by l_partkey;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE lineitem range i_l_suppkey_partkey,i_l_partkey i_l_partkey 5 NULL # Using where; Using index
|
||||
flush status;
|
||||
select max(l_orderkey) from lineitem
|
||||
where l_partkey between 1 and 10 group by l_partkey;
|
||||
max(l_orderkey)
|
||||
5984
|
||||
5957
|
||||
5892
|
||||
5856
|
||||
5959
|
||||
5957
|
||||
5794
|
||||
5894
|
||||
5859
|
||||
5632
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 1
|
||||
Handler_read_last 0
|
||||
Handler_read_next 294
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select max(l_orderkey) from lineitem
|
||||
where l_partkey between 1 and 10 group by l_partkey;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE lineitem range i_l_suppkey_partkey,i_l_partkey i_l_partkey 5 NULL # Using where; Using index for group-by
|
||||
flush status;
|
||||
select max(l_orderkey) from lineitem
|
||||
where l_partkey between 1 and 10 group by l_partkey;
|
||||
max(l_orderkey)
|
||||
5984
|
||||
5957
|
||||
5892
|
||||
5856
|
||||
5959
|
||||
5957
|
||||
5794
|
||||
5894
|
||||
5859
|
||||
5632
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 21
|
||||
Handler_read_last 1
|
||||
Handler_read_next 0
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select max(l_orderkey) from lineitem
|
||||
where l_suppkey in (1,4) group by l_suppkey;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE lineitem range i_l_suppkey i_l_suppkey 5 NULL # Using where; Using index
|
||||
flush status;
|
||||
select max(l_orderkey) from lineitem
|
||||
where l_suppkey in (1,4) group by l_suppkey;
|
||||
max(l_orderkey)
|
||||
5988
|
||||
5984
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 2
|
||||
Handler_read_last 0
|
||||
Handler_read_next 1230
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select max(l_orderkey) from lineitem
|
||||
where l_suppkey in (1,4) group by l_suppkey;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE lineitem range i_l_suppkey i_l_suppkey 5 NULL # Using where; Using index for group-by
|
||||
flush status;
|
||||
select max(l_orderkey) from lineitem
|
||||
where l_suppkey in (1,4) group by l_suppkey;
|
||||
max(l_orderkey)
|
||||
5988
|
||||
5984
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 6
|
||||
Handler_read_last 1
|
||||
Handler_read_next 0
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
create index i_p_retailprice on part(p_retailprice);
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select o_orderkey, p_partkey
|
||||
from part use index (i_p_retailprice),
|
||||
lineitem use index (i_l_partkey), orders
|
||||
where p_retailprice > 1100 and o_orderdate='1997-01-01'
|
||||
and o_orderkey=l_orderkey and p_partkey=l_partkey;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE part range i_p_retailprice i_p_retailprice 9 NULL # Using where; Using index
|
||||
1 SIMPLE orders ref PRIMARY,i_o_orderdate i_o_orderdate 4 const # Using index
|
||||
1 SIMPLE lineitem ref i_l_partkey i_l_partkey 5 dbt3_s001.part.p_partkey # Using where; Using index
|
||||
flush status;
|
||||
select o_orderkey, p_partkey
|
||||
from part use index (i_p_retailprice),
|
||||
lineitem use index (i_l_partkey), orders
|
||||
where p_retailprice > 1100 and o_orderdate='1997-01-01'
|
||||
and o_orderkey=l_orderkey and p_partkey=l_partkey;
|
||||
o_orderkey p_partkey
|
||||
5895 200
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 3
|
||||
Handler_read_last 0
|
||||
Handler_read_next 26
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select o_orderkey, p_partkey
|
||||
from part use index (i_p_retailprice),
|
||||
lineitem use index (i_l_partkey), orders
|
||||
where p_retailprice > 1100 and o_orderdate='1997-01-01'
|
||||
and o_orderkey=l_orderkey and p_partkey=l_partkey;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE part range i_p_retailprice i_p_retailprice 9 NULL # Using where; Using index
|
||||
1 SIMPLE orders ref PRIMARY,i_o_orderdate i_o_orderdate 4 const # Using index
|
||||
1 SIMPLE lineitem ref i_l_partkey i_l_partkey 9 dbt3_s001.part.p_partkey,dbt3_s001.orders.o_orderkey # Using index
|
||||
flush status;
|
||||
select o_orderkey, p_partkey
|
||||
from part use index (i_p_retailprice),
|
||||
lineitem use index (i_l_partkey), orders
|
||||
where p_retailprice > 1100 and o_orderdate='1997-01-01'
|
||||
and o_orderkey=l_orderkey and p_partkey=l_partkey;
|
||||
o_orderkey p_partkey
|
||||
5895 200
|
||||
show status like 'handler_read%';
|
||||
Variable_name Value
|
||||
Handler_read_first 0
|
||||
Handler_read_key 3
|
||||
Handler_read_last 0
|
||||
Handler_read_next 3
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
Handler_read_rnd_deleted 0
|
||||
Handler_read_rnd_next 0
|
||||
DROP DATABASE dbt3_s001;
|
||||
use test;
|
||||
#
|
||||
# LP Bug #914560: query containing IN subquery
|
||||
# + extended_keys = on
|
||||
#
|
||||
set @save_optimizer_switch=@@optimizer_switch;
|
||||
SET optimizer_switch='materialization=on,semijoin=on';
|
||||
SET optimizer_switch='extended_keys=on';
|
||||
CREATE TABLE t1 (a int, b int) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1,1), (2,2);
|
||||
SELECT * FROM t1 WHERE 2 IN (SELECT MAX(s1.a) FROM t1 AS s1, t1 AS s2);
|
||||
a b
|
||||
1 1
|
||||
2 2
|
||||
EXPLAIN
|
||||
SELECT * FROM t1 WHERE 2 IN (SELECT MAX(s1.a) FROM t1 AS s1, t1 AS s2);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY <subquery2> const distinct_key distinct_key 4 const 1
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join)
|
||||
2 MATERIALIZED s1 ALL NULL NULL NULL NULL 2
|
||||
2 MATERIALIZED s2 ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join)
|
||||
DROP TABLE t1;
|
||||
set optimizer_switch=@save_optimizer_switch;
|
||||
#
|
||||
# LP Bug #915291: query using a materialized view
|
||||
# + extended_keys = on
|
||||
# (valgrinf complains fixed by the patch for bug #914560)
|
||||
#
|
||||
set @save_optimizer_switch=@@optimizer_switch;
|
||||
SET optimizer_switch = 'derived_with_keys=on';
|
||||
SET optimizer_switch = 'extended_keys=on';
|
||||
CREATE TABLE t1 (a varchar(1)) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ('j'), ('v');
|
||||
CREATE TABLE t2 (b varchar(1)) ENGINE=MyISAM;
|
||||
INSERT INTO t2 VALUES ('j'), ('v');
|
||||
CREATE TABLE t3 (c varchar(1));
|
||||
INSERT INTO t2 VALUES ('m'), ('n');
|
||||
CREATE VIEW v
|
||||
AS SELECT DISTINCT * FROM t2 STRAIGHT_JOIN t3;
|
||||
SELECT * FROM t1, v WHERE a = b;
|
||||
a b c
|
||||
DROP VIEW v;
|
||||
DROP TABLE t1,t2,t3;
|
||||
set optimizer_switch=@save_optimizer_switch;
|
||||
#
|
||||
# LP Bug #921167: query containing IN subquery
|
||||
# + extended_keys = on
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
a int NOT NULL, b varchar(1) NOT NULL, KEY(a), KEY(b,a)
|
||||
) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES
|
||||
(0,'j'), (8,'v'), (1,'c'), (8,'m'), (9,'d'),
|
||||
(24,'d'), (6,'y'), (1,'t'), (6,'d'), (2,'s');
|
||||
CREATE TABLE t2 (
|
||||
c int NOT NULL PRIMARY KEY
|
||||
) ENGINE=MyISAM;
|
||||
INSERT INTO t2 VALUES
|
||||
(10), (11), (12), (13), (14),
|
||||
(15), (16), (17), (18), (19), (24);
|
||||
set @save_optimizer_switch=@@optimizer_switch;
|
||||
SET optimizer_switch = 'extended_keys=off';
|
||||
EXPLAIN
|
||||
SELECT a FROM t1 AS t, t2
|
||||
WHERE c = a AND b IN (SELECT b FROM t1, t2 WHERE b = t.b);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t index a,b b 7 NULL 10 Using index
|
||||
1 PRIMARY t1 ref b b 3 test.t.b 2 Using index; FirstMatch(t)
|
||||
1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 test.t.a 1 Using index
|
||||
1 PRIMARY t2 index NULL PRIMARY 4 NULL 11 Using index; FirstMatch(t2)
|
||||
SELECT a FROM t1 AS t, t2
|
||||
WHERE c = a AND b IN (SELECT b FROM t1, t2 WHERE b = t.b);
|
||||
a
|
||||
24
|
||||
SET optimizer_switch = 'extended_keys=on';
|
||||
EXPLAIN
|
||||
SELECT a FROM t1 AS t, t2
|
||||
WHERE c = a AND b IN (SELECT b FROM t1, t2 WHERE b = t.b);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t index a,b b 7 NULL 10 Using index
|
||||
1 PRIMARY t1 ref b b 3 test.t.b 2 Using index; FirstMatch(t)
|
||||
1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 test.t.a 1 Using index
|
||||
1 PRIMARY t2 index NULL PRIMARY 4 NULL 11 Using index; FirstMatch(t2)
|
||||
SELECT a FROM t1 AS t, t2
|
||||
WHERE c = a AND b IN (SELECT b FROM t1, t2 WHERE b = t.b);
|
||||
a
|
||||
24
|
||||
set optimizer_switch=@save_optimizer_switch;
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# LP Bug #923236: hash join + extended_keys = on
|
||||
#
|
||||
CREATE TABLE t1 (a int) ENGINE=MyISAM;
|
||||
CREATE TABLE t2 (b int) ENGINE=MyISAM;
|
||||
INSERT INTO t1 (a) VALUES (4), (6);
|
||||
INSERT INTO t2 (b) VALUES (0), (8);
|
||||
set @save_optimizer_switch=@@optimizer_switch;
|
||||
SET join_cache_level=3;
|
||||
SET optimizer_switch='join_cache_hashed=on';
|
||||
SET optimizer_switch='join_cache_bka=on';
|
||||
SET optimizer_switch='extended_keys=on';
|
||||
EXPLAIN
|
||||
SELECT * FROM t1, t2 WHERE b=a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
|
||||
1 SIMPLE t2 hash_ALL NULL #hash#$hj 5 test.t1.a 2 Using where; Using join buffer (flat, BNLH join)
|
||||
SELECT * FROM t1, t2 WHERE b=a;
|
||||
a b
|
||||
set optimizer_switch=@save_optimizer_switch;
|
||||
DROP TABLE t1,t2;
|
||||
set optimizer_switch=@save_ext_key_optimizer_switch;
|
||||
SET SESSION STORAGE_ENGINE=DEFAULT;
|
@ -491,8 +491,8 @@ The following options may be given as the first argument:
|
||||
mrr_cost_based, mrr_sort_keys, optimize_join_buffer_size,
|
||||
outer_join_with_cache, partial_match_rowid_merge,
|
||||
partial_match_table_scan, semijoin, semijoin_with_cache,
|
||||
subquery_cache, table_elimination } and val is one of
|
||||
{on, off, default}
|
||||
subquery_cache, table_elimination, extended_keys } and
|
||||
val is one of {on, off, default}
|
||||
--performance-schema
|
||||
Enable the performance schema.
|
||||
--performance-schema-events-waits-history-long-size=#
|
||||
|
@ -9,7 +9,7 @@ SELECT @global_start_value;
|
||||
select @old_session_opt_switch:=@@session.optimizer_switch,
|
||||
@old_global_opt_switch:=@@global.optimizer_switch;
|
||||
@old_session_opt_switch:=@@session.optimizer_switch @old_global_opt_switch:=@@global.optimizer_switch
|
||||
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
||||
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
'#--------------------FN_DYNVARS_028_01------------------------#'
|
||||
SET @@session.engine_condition_pushdown = 0;
|
||||
Warnings:
|
||||
@ -212,7 +212,7 @@ select @@session.engine_condition_pushdown,
|
||||
@@global.engine_condition_pushdown,
|
||||
@@session.optimizer_switch, @@global.optimizer_switch;
|
||||
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
|
||||
0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
||||
0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
set @@session.engine_condition_pushdown = TRUE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
@ -220,7 +220,7 @@ select @@session.engine_condition_pushdown,
|
||||
@@global.engine_condition_pushdown,
|
||||
@@session.optimizer_switch, @@global.optimizer_switch;
|
||||
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
|
||||
1 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
||||
1 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
set @@session.engine_condition_pushdown = FALSE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
@ -228,7 +228,7 @@ select @@session.engine_condition_pushdown,
|
||||
@@global.engine_condition_pushdown,
|
||||
@@session.optimizer_switch, @@global.optimizer_switch;
|
||||
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
|
||||
0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
||||
0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
set @@global.engine_condition_pushdown = TRUE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
@ -236,7 +236,7 @@ select @@session.engine_condition_pushdown,
|
||||
@@global.engine_condition_pushdown,
|
||||
@@session.optimizer_switch, @@global.optimizer_switch;
|
||||
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
|
||||
0 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
||||
0 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
set @@global.engine_condition_pushdown = FALSE;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
@ -244,31 +244,31 @@ select @@session.engine_condition_pushdown,
|
||||
@@global.engine_condition_pushdown,
|
||||
@@session.optimizer_switch, @@global.optimizer_switch;
|
||||
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
|
||||
0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
||||
0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
set @@session.optimizer_switch = "engine_condition_pushdown=on";
|
||||
select @@session.engine_condition_pushdown,
|
||||
@@global.engine_condition_pushdown,
|
||||
@@session.optimizer_switch, @@global.optimizer_switch;
|
||||
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
|
||||
1 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
||||
1 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
set @@session.optimizer_switch = "engine_condition_pushdown=off";
|
||||
select @@session.engine_condition_pushdown,
|
||||
@@global.engine_condition_pushdown,
|
||||
@@session.optimizer_switch, @@global.optimizer_switch;
|
||||
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
|
||||
0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
||||
0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
set @@global.optimizer_switch = "engine_condition_pushdown=on";
|
||||
select @@session.engine_condition_pushdown,
|
||||
@@global.engine_condition_pushdown,
|
||||
@@session.optimizer_switch, @@global.optimizer_switch;
|
||||
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
|
||||
0 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
||||
0 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
set @@global.optimizer_switch = "engine_condition_pushdown=off";
|
||||
select @@session.engine_condition_pushdown,
|
||||
@@global.engine_condition_pushdown,
|
||||
@@session.optimizer_switch, @@global.optimizer_switch;
|
||||
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
|
||||
0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
||||
0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
SET @@session.engine_condition_pushdown = @session_start_value;
|
||||
Warnings:
|
||||
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead
|
||||
@ -287,4 +287,4 @@ select @@session.engine_condition_pushdown,
|
||||
@@global.engine_condition_pushdown,
|
||||
@@session.optimizer_switch, @@global.optimizer_switch;
|
||||
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
|
||||
0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
||||
0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
|
@ -1,61 +1,61 @@
|
||||
SET @start_global_value = @@global.optimizer_switch;
|
||||
SELECT @start_global_value;
|
||||
@start_global_value
|
||||
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
||||
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
select @@global.optimizer_switch;
|
||||
@@global.optimizer_switch
|
||||
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
||||
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
select @@session.optimizer_switch;
|
||||
@@session.optimizer_switch
|
||||
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
||||
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
show global variables like 'optimizer_switch';
|
||||
Variable_name Value
|
||||
optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
||||
optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
show session variables like 'optimizer_switch';
|
||||
Variable_name Value
|
||||
optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
||||
optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
select * from information_schema.global_variables where variable_name='optimizer_switch';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
||||
OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
select * from information_schema.session_variables where variable_name='optimizer_switch';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
||||
OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
set global optimizer_switch=10;
|
||||
set session optimizer_switch=5;
|
||||
select @@global.optimizer_switch;
|
||||
@@global.optimizer_switch
|
||||
index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off
|
||||
index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off
|
||||
select @@session.optimizer_switch;
|
||||
@@session.optimizer_switch
|
||||
index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off
|
||||
index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off
|
||||
set global optimizer_switch="index_merge_sort_union=on";
|
||||
set session optimizer_switch="index_merge=off";
|
||||
select @@global.optimizer_switch;
|
||||
@@global.optimizer_switch
|
||||
index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off
|
||||
index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off
|
||||
select @@session.optimizer_switch;
|
||||
@@session.optimizer_switch
|
||||
index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off
|
||||
index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off
|
||||
show global variables like 'optimizer_switch';
|
||||
Variable_name Value
|
||||
optimizer_switch index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off
|
||||
optimizer_switch index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off
|
||||
show session variables like 'optimizer_switch';
|
||||
Variable_name Value
|
||||
optimizer_switch index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off
|
||||
optimizer_switch index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off
|
||||
select * from information_schema.global_variables where variable_name='optimizer_switch';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
OPTIMIZER_SWITCH index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off
|
||||
OPTIMIZER_SWITCH index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off
|
||||
select * from information_schema.session_variables where variable_name='optimizer_switch';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
OPTIMIZER_SWITCH index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off
|
||||
OPTIMIZER_SWITCH index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off
|
||||
set session optimizer_switch="default";
|
||||
select @@session.optimizer_switch;
|
||||
@@session.optimizer_switch
|
||||
index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off
|
||||
index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off
|
||||
set optimizer_switch = replace(@@optimizer_switch, '=off', '=on');
|
||||
select @@optimizer_switch;
|
||||
@@optimizer_switch
|
||||
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=on,mrr_sort_keys=on,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on
|
||||
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=on,mrr_cost_based=on,mrr_sort_keys=on,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on
|
||||
set global optimizer_switch=1.1;
|
||||
ERROR 42000: Incorrect argument type to variable 'optimizer_switch'
|
||||
set global optimizer_switch=1e1;
|
||||
@ -67,4 +67,4 @@ ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'foobar'
|
||||
SET @@global.optimizer_switch = @start_global_value;
|
||||
SELECT @@global.optimizer_switch;
|
||||
@@global.optimizer_switch
|
||||
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
||||
index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
|
@ -2,4 +2,4 @@ select @@session.engine_condition_pushdown,
|
||||
@@global.engine_condition_pushdown,
|
||||
@@session.optimizer_switch, @@global.optimizer_switch;
|
||||
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
|
||||
1 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
||||
1 1 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=on,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
|
@ -2,4 +2,4 @@ select @@session.engine_condition_pushdown,
|
||||
@@global.engine_condition_pushdown,
|
||||
@@session.optimizer_switch, @@global.optimizer_switch;
|
||||
@@session.engine_condition_pushdown @@global.engine_condition_pushdown @@session.optimizer_switch @@global.optimizer_switch
|
||||
0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on
|
||||
0 0 index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off
|
||||
|
411
mysql-test/t/innodb_ext_key.test
Normal file
411
mysql-test/t/innodb_ext_key.test
Normal file
@ -0,0 +1,411 @@
|
||||
--source include/have_xtradb.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1,t2,t3,t4;
|
||||
DROP DATABASE IF EXISTS dbt3_s001;
|
||||
--enable_warnings
|
||||
|
||||
SET SESSION STORAGE_ENGINE='InnoDB';
|
||||
|
||||
CREATE DATABASE dbt3_s001;
|
||||
|
||||
use dbt3_s001;
|
||||
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
--disable_warnings
|
||||
--source include/dbt3_s001.inc
|
||||
--enable_warnings
|
||||
--enable_result_log
|
||||
--enable_query_log
|
||||
|
||||
set @save_ext_key_optimizer_switch=@@optimizer_switch;
|
||||
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
|
||||
flush status;
|
||||
select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
|
||||
flush status;
|
||||
select count(*) from lineitem where l_orderkey=130 and l_shipdate='1992-07-01';
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select count(*) from lineitem
|
||||
where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01';
|
||||
flush status;
|
||||
select count(*) from lineitem
|
||||
where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01';
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select count(*) from lineitem
|
||||
where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01';
|
||||
flush status;
|
||||
select count(*) from lineitem
|
||||
where l_orderkey=130 and l_linenumber=2 and l_shipdate='1992-07-01';
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select count(*) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000;
|
||||
flush status;
|
||||
select count(*) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000;
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select count(*) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000;
|
||||
flush status;
|
||||
select count(*) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000;
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select l_orderkey, l_linenumber from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
|
||||
flush status;
|
||||
select l_orderkey, l_linenumber from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select l_orderkey, l_linenumber from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
|
||||
flush status;
|
||||
select l_orderkey, l_linenumber from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select min(l_orderkey) from lineitem where l_shipdate='1992-07-01';
|
||||
flush status;
|
||||
select min(l_orderkey) from lineitem where l_shipdate='1992-07-01';
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select min(l_orderkey) from lineitem where l_shipdate='1992-07-01';
|
||||
flush status;
|
||||
select min(l_orderkey) from lineitem where l_shipdate='1992-07-01';
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select min(l_orderkey) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
|
||||
flush status;
|
||||
select min(l_orderkey) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select min(l_orderkey) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
|
||||
flush status;
|
||||
select min(l_orderkey) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1001 and 2000;
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select max(l_linenumber) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey=130;
|
||||
flush status;
|
||||
select max(l_linenumber) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey=130;
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select max(l_linenumber) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey=130;
|
||||
flush status;
|
||||
select max(l_linenumber) from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey=130;
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select l_orderkey, l_linenumber
|
||||
from lineitem use index (i_l_shipdate, i_l_receiptdate)
|
||||
where l_shipdate='1992-07-01' and l_orderkey=130
|
||||
or l_receiptdate='1992-07-01' and l_orderkey=5603;
|
||||
flush status;
|
||||
select l_orderkey, l_linenumber
|
||||
from lineitem use index (i_l_shipdate, i_l_receiptdate)
|
||||
where l_shipdate='1992-07-01' and l_orderkey=130
|
||||
or l_receiptdate='1992-07-01' and l_orderkey=5603;
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select l_orderkey, l_linenumber
|
||||
from lineitem use index (i_l_shipdate, i_l_receiptdate)
|
||||
where l_shipdate='1992-07-01' and l_orderkey=130
|
||||
or l_receiptdate='1992-07-01' and l_orderkey=5603;
|
||||
flush status;
|
||||
select l_orderkey, l_linenumber
|
||||
from lineitem use index (i_l_shipdate, i_l_receiptdate)
|
||||
where l_shipdate='1992-07-01' and l_orderkey=130
|
||||
or l_receiptdate='1992-07-01' and l_orderkey=5603;
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select l_orderkey, l_linenumber
|
||||
from lineitem use index (i_l_shipdate, i_l_receiptdate)
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
|
||||
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
|
||||
flush status;
|
||||
select l_orderkey, l_linenumber
|
||||
from lineitem use index (i_l_shipdate, i_l_receiptdate)
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
|
||||
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select l_orderkey, l_linenumber
|
||||
from lineitem use index (i_l_shipdate, i_l_receiptdate)
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
|
||||
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
|
||||
flush status;
|
||||
select l_orderkey, l_linenumber
|
||||
from lineitem use index (i_l_shipdate, i_l_receiptdate)
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
|
||||
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=off';
|
||||
explain
|
||||
select l_orderkey, l_linenumber from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
|
||||
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
|
||||
flush status;
|
||||
select l_orderkey, l_linenumber from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
|
||||
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=on';
|
||||
explain
|
||||
select l_orderkey, l_linenumber from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
|
||||
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
|
||||
flush status;
|
||||
select l_orderkey, l_linenumber from lineitem
|
||||
where l_shipdate='1992-07-01' and l_orderkey between 1 and 1000
|
||||
or l_receiptdate='1992-07-01' and l_orderkey between 5001 and 6000;
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=off';
|
||||
--replace_column 9 #
|
||||
explain
|
||||
select max(l_orderkey) from lineitem
|
||||
where l_partkey between 1 and 10 group by l_partkey;
|
||||
flush status;
|
||||
select max(l_orderkey) from lineitem
|
||||
where l_partkey between 1 and 10 group by l_partkey;
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=on';
|
||||
--replace_column 9 #
|
||||
explain
|
||||
select max(l_orderkey) from lineitem
|
||||
where l_partkey between 1 and 10 group by l_partkey;
|
||||
flush status;
|
||||
select max(l_orderkey) from lineitem
|
||||
where l_partkey between 1 and 10 group by l_partkey;
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=off';
|
||||
--replace_column 9 #
|
||||
explain
|
||||
select max(l_orderkey) from lineitem
|
||||
where l_suppkey in (1,4) group by l_suppkey;
|
||||
flush status;
|
||||
select max(l_orderkey) from lineitem
|
||||
where l_suppkey in (1,4) group by l_suppkey;
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=on';
|
||||
--replace_column 9 #
|
||||
explain
|
||||
select max(l_orderkey) from lineitem
|
||||
where l_suppkey in (1,4) group by l_suppkey;
|
||||
flush status;
|
||||
select max(l_orderkey) from lineitem
|
||||
where l_suppkey in (1,4) group by l_suppkey;
|
||||
show status like 'handler_read%';
|
||||
|
||||
create index i_p_retailprice on part(p_retailprice);
|
||||
|
||||
set optimizer_switch='extended_keys=off';
|
||||
--replace_column 9 #
|
||||
explain
|
||||
select o_orderkey, p_partkey
|
||||
from part use index (i_p_retailprice),
|
||||
lineitem use index (i_l_partkey), orders
|
||||
where p_retailprice > 1100 and o_orderdate='1997-01-01'
|
||||
and o_orderkey=l_orderkey and p_partkey=l_partkey;
|
||||
flush status;
|
||||
select o_orderkey, p_partkey
|
||||
from part use index (i_p_retailprice),
|
||||
lineitem use index (i_l_partkey), orders
|
||||
where p_retailprice > 1100 and o_orderdate='1997-01-01'
|
||||
and o_orderkey=l_orderkey and p_partkey=l_partkey;
|
||||
show status like 'handler_read%';
|
||||
|
||||
set optimizer_switch='extended_keys=on';
|
||||
--replace_column 9 #
|
||||
explain
|
||||
select o_orderkey, p_partkey
|
||||
from part use index (i_p_retailprice),
|
||||
lineitem use index (i_l_partkey), orders
|
||||
where p_retailprice > 1100 and o_orderdate='1997-01-01'
|
||||
and o_orderkey=l_orderkey and p_partkey=l_partkey;
|
||||
flush status;
|
||||
select o_orderkey, p_partkey
|
||||
from part use index (i_p_retailprice),
|
||||
lineitem use index (i_l_partkey), orders
|
||||
where p_retailprice > 1100 and o_orderdate='1997-01-01'
|
||||
and o_orderkey=l_orderkey and p_partkey=l_partkey;
|
||||
show status like 'handler_read%';
|
||||
|
||||
DROP DATABASE dbt3_s001;
|
||||
|
||||
use test;
|
||||
|
||||
--echo #
|
||||
--echo # LP Bug #914560: query containing IN subquery
|
||||
--echo # + extended_keys = on
|
||||
--echo #
|
||||
|
||||
set @save_optimizer_switch=@@optimizer_switch;
|
||||
|
||||
SET optimizer_switch='materialization=on,semijoin=on';
|
||||
SET optimizer_switch='extended_keys=on';
|
||||
|
||||
CREATE TABLE t1 (a int, b int) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1,1), (2,2);
|
||||
|
||||
SELECT * FROM t1 WHERE 2 IN (SELECT MAX(s1.a) FROM t1 AS s1, t1 AS s2);
|
||||
EXPLAIN
|
||||
SELECT * FROM t1 WHERE 2 IN (SELECT MAX(s1.a) FROM t1 AS s1, t1 AS s2);
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
set optimizer_switch=@save_optimizer_switch;
|
||||
|
||||
--echo #
|
||||
--echo # LP Bug #915291: query using a materialized view
|
||||
--echo # + extended_keys = on
|
||||
--echo # (valgrinf complains fixed by the patch for bug #914560)
|
||||
--echo #
|
||||
|
||||
set @save_optimizer_switch=@@optimizer_switch;
|
||||
|
||||
SET optimizer_switch = 'derived_with_keys=on';
|
||||
SET optimizer_switch = 'extended_keys=on';
|
||||
|
||||
CREATE TABLE t1 (a varchar(1)) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ('j'), ('v');
|
||||
|
||||
CREATE TABLE t2 (b varchar(1)) ENGINE=MyISAM;
|
||||
INSERT INTO t2 VALUES ('j'), ('v');
|
||||
|
||||
CREATE TABLE t3 (c varchar(1));
|
||||
INSERT INTO t2 VALUES ('m'), ('n');
|
||||
|
||||
CREATE VIEW v
|
||||
AS SELECT DISTINCT * FROM t2 STRAIGHT_JOIN t3;
|
||||
|
||||
SELECT * FROM t1, v WHERE a = b;
|
||||
|
||||
DROP VIEW v;
|
||||
DROP TABLE t1,t2,t3;
|
||||
|
||||
set optimizer_switch=@save_optimizer_switch;
|
||||
|
||||
--echo #
|
||||
--echo # LP Bug #921167: query containing IN subquery
|
||||
--echo # + extended_keys = on
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a int NOT NULL, b varchar(1) NOT NULL, KEY(a), KEY(b,a)
|
||||
) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES
|
||||
(0,'j'), (8,'v'), (1,'c'), (8,'m'), (9,'d'),
|
||||
(24,'d'), (6,'y'), (1,'t'), (6,'d'), (2,'s');
|
||||
|
||||
CREATE TABLE t2 (
|
||||
c int NOT NULL PRIMARY KEY
|
||||
) ENGINE=MyISAM;
|
||||
INSERT INTO t2 VALUES
|
||||
(10), (11), (12), (13), (14),
|
||||
(15), (16), (17), (18), (19), (24);
|
||||
|
||||
set @save_optimizer_switch=@@optimizer_switch;
|
||||
|
||||
SET optimizer_switch = 'extended_keys=off';
|
||||
EXPLAIN
|
||||
SELECT a FROM t1 AS t, t2
|
||||
WHERE c = a AND b IN (SELECT b FROM t1, t2 WHERE b = t.b);
|
||||
SELECT a FROM t1 AS t, t2
|
||||
WHERE c = a AND b IN (SELECT b FROM t1, t2 WHERE b = t.b);
|
||||
|
||||
SET optimizer_switch = 'extended_keys=on';
|
||||
EXPLAIN
|
||||
SELECT a FROM t1 AS t, t2
|
||||
WHERE c = a AND b IN (SELECT b FROM t1, t2 WHERE b = t.b);
|
||||
SELECT a FROM t1 AS t, t2
|
||||
WHERE c = a AND b IN (SELECT b FROM t1, t2 WHERE b = t.b);
|
||||
|
||||
set optimizer_switch=@save_optimizer_switch;
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
--echo #
|
||||
--echo # LP Bug #923236: hash join + extended_keys = on
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a int) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE t2 (b int) ENGINE=MyISAM;
|
||||
|
||||
INSERT INTO t1 (a) VALUES (4), (6);
|
||||
INSERT INTO t2 (b) VALUES (0), (8);
|
||||
|
||||
set @save_optimizer_switch=@@optimizer_switch;
|
||||
|
||||
SET join_cache_level=3;
|
||||
SET optimizer_switch='join_cache_hashed=on';
|
||||
SET optimizer_switch='join_cache_bka=on';
|
||||
SET optimizer_switch='extended_keys=on';
|
||||
|
||||
EXPLAIN
|
||||
SELECT * FROM t1, t2 WHERE b=a;
|
||||
SELECT * FROM t1, t2 WHERE b=a;
|
||||
|
||||
set optimizer_switch=@save_optimizer_switch;
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
set optimizer_switch=@save_ext_key_optimizer_switch;
|
||||
SET SESSION STORAGE_ENGINE=DEFAULT;
|
@ -2191,11 +2191,12 @@ double handler::keyread_time(uint index, uint ranges, ha_rows rows)
|
||||
performs a random seek, thus the cost is proportional to the number of
|
||||
blocks read. This model does not take into account clustered indexes -
|
||||
engines that support that (e.g. InnoDB) may want to overwrite this method.
|
||||
The model counts in the time to read index entries from cache.
|
||||
*/
|
||||
double keys_per_block= (stats.block_size/2.0/
|
||||
(table->key_info[index].key_length +
|
||||
ref_length) + 1);
|
||||
return (rows + keys_per_block - 1)/ keys_per_block;
|
||||
ulong len= table->key_info[index].key_length + ref_length;
|
||||
double keys_per_block= (stats.block_size/2.0/len+1);
|
||||
return (rows + keys_per_block-1)/ keys_per_block +
|
||||
len*rows/(stats.block_size+1)/TIME_FOR_COMPARE ;
|
||||
}
|
||||
|
||||
void **handler::ha_data(THD *thd) const
|
||||
|
@ -2928,9 +2928,10 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
|
||||
|
||||
thd->no_errors=1; // Don't warn about NULL
|
||||
init_sql_alloc(&alloc, thd->variables.range_alloc_block_size, 0);
|
||||
if (!(param.key_parts= (KEY_PART*) alloc_root(&alloc,
|
||||
sizeof(KEY_PART)*
|
||||
head->s->key_parts)) ||
|
||||
if (!(param.key_parts=
|
||||
(KEY_PART*) alloc_root(&alloc,
|
||||
sizeof(KEY_PART) *
|
||||
head->s->actual_n_key_parts(thd))) ||
|
||||
fill_used_fields_bitmap(¶m))
|
||||
{
|
||||
thd->no_errors=0;
|
||||
@ -2948,6 +2949,8 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
|
||||
for (idx=0 ; idx < head->s->keys ; idx++, key_info++)
|
||||
{
|
||||
KEY_PART_INFO *key_part_info;
|
||||
uint n_key_parts= head->actual_n_key_parts(key_info);
|
||||
|
||||
if (!keys_to_use.is_set(idx))
|
||||
continue;
|
||||
if (key_info->flags & HA_FULLTEXT)
|
||||
@ -2955,9 +2958,9 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use,
|
||||
|
||||
param.key[param.keys]=key_parts;
|
||||
key_part_info= key_info->key_part;
|
||||
for (uint part=0 ; part < key_info->key_parts ;
|
||||
part++, key_parts++, key_part_info++)
|
||||
{
|
||||
for (uint part= 0 ; part < n_key_parts ;
|
||||
part++, key_parts++, key_part_info++)
|
||||
{
|
||||
key_parts->key= param.keys;
|
||||
key_parts->part= part;
|
||||
key_parts->length= key_part_info->length;
|
||||
@ -10122,13 +10125,14 @@ get_quick_select(PARAM *param,uint idx,SEL_ARG *key_tree, uint mrr_flags,
|
||||
}
|
||||
else
|
||||
{
|
||||
KEY *keyinfo= param->table->key_info+param->real_keynr[idx];
|
||||
quick->mrr_flags= mrr_flags;
|
||||
quick->mrr_buf_size= mrr_buf_size;
|
||||
quick->key_parts=(KEY_PART*)
|
||||
memdup_root(parent_alloc? parent_alloc : &quick->alloc,
|
||||
(char*) param->key[idx],
|
||||
sizeof(KEY_PART)*
|
||||
param->table->key_info[param->real_keynr[idx]].key_parts);
|
||||
param->table->actual_n_key_parts(keyinfo));
|
||||
}
|
||||
}
|
||||
DBUG_RETURN(quick);
|
||||
@ -11815,6 +11819,7 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
|
||||
KEY_PART_INFO *last_part;
|
||||
KEY_PART_INFO *first_non_group_part;
|
||||
KEY_PART_INFO *first_non_infix_part;
|
||||
uint key_parts;
|
||||
uint key_infix_parts;
|
||||
uint cur_group_key_parts= 0;
|
||||
uint cur_group_prefix_len= 0;
|
||||
@ -11830,6 +11835,7 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
|
||||
goto next_index;
|
||||
|
||||
/*
|
||||
Unless extended keys can be used for cur_index:
|
||||
If the current storage manager is such that it appends the primary key to
|
||||
each index, then the above condition is insufficient to check if the
|
||||
index is covering. In such cases it may happen that some fields are
|
||||
@ -11838,7 +11844,8 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
|
||||
does not qualify as covering in our case. If this is the case, below
|
||||
we check that all query fields are indeed covered by 'cur_index'.
|
||||
*/
|
||||
if (pk < MAX_KEY && cur_index != pk &&
|
||||
if (cur_index_info->key_parts == table->actual_n_key_parts(cur_index_info)
|
||||
&& pk < MAX_KEY && cur_index != pk &&
|
||||
(table->file->ha_table_flags() & HA_PRIMARY_KEY_IN_READ_INDEX))
|
||||
{
|
||||
/* For each table field */
|
||||
@ -11857,13 +11864,14 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
|
||||
|
||||
max_key_part= 0;
|
||||
used_key_parts_map.clear_all();
|
||||
|
||||
/*
|
||||
Check (GA1) for GROUP BY queries.
|
||||
*/
|
||||
if (join->group_list)
|
||||
{
|
||||
cur_part= cur_index_info->key_part;
|
||||
end_part= cur_part + cur_index_info->key_parts;
|
||||
end_part= cur_part + table->actual_n_key_parts(cur_index_info);
|
||||
/* Iterate in parallel over the GROUP list and the index parts. */
|
||||
for (tmp_group= join->group_list; tmp_group && (cur_part != end_part);
|
||||
tmp_group= tmp_group->next, cur_part++)
|
||||
@ -11969,8 +11977,9 @@ get_best_group_min_max(PARAM *param, SEL_TREE *tree, double read_time)
|
||||
must form a sequence without any gaps that starts immediately after the
|
||||
last group keypart.
|
||||
*/
|
||||
last_part= cur_index_info->key_part + cur_index_info->key_parts;
|
||||
first_non_group_part= (cur_group_key_parts < cur_index_info->key_parts) ?
|
||||
key_parts= table->actual_n_key_parts(cur_index_info);
|
||||
last_part= cur_index_info->key_part + key_parts;
|
||||
first_non_group_part= (cur_group_key_parts < key_parts) ?
|
||||
cur_index_info->key_part + cur_group_key_parts :
|
||||
NULL;
|
||||
first_non_infix_part= min_max_arg_part ?
|
||||
@ -12433,7 +12442,9 @@ get_field_keypart(KEY *index, Field *field)
|
||||
{
|
||||
KEY_PART_INFO *part, *end;
|
||||
|
||||
for (part= index->key_part, end= part + index->key_parts; part < end; part++)
|
||||
for (part= index->key_part,
|
||||
end= part + field->table->actual_n_key_parts(index);
|
||||
part < end; part++)
|
||||
{
|
||||
if (field->eq(part->field))
|
||||
return part - index->key_part + 1;
|
||||
|
@ -856,7 +856,6 @@ static bool matching_cond(bool max_fl, TABLE_REF *ref, KEY *keyinfo,
|
||||
1 Can use key to optimize MIN()/MAX().
|
||||
In this case ref, range_fl and prefix_len are updated
|
||||
*/
|
||||
|
||||
|
||||
static bool find_key_for_maxmin(bool max_fl, TABLE_REF *ref,
|
||||
Field* field, COND *cond,
|
||||
@ -885,7 +884,8 @@ static bool find_key_for_maxmin(bool max_fl, TABLE_REF *ref,
|
||||
continue;
|
||||
uint jdx= 0;
|
||||
*prefix_len= 0;
|
||||
for (part= keyinfo->key_part, part_end= part+keyinfo->key_parts ;
|
||||
part_end= keyinfo->key_part+table->actual_n_key_parts(keyinfo);
|
||||
for (part= keyinfo->key_part ;
|
||||
part != part_end ;
|
||||
part++, jdx++, key_part_to_use= (key_part_to_use << 1) | 1)
|
||||
{
|
||||
|
@ -190,7 +190,8 @@
|
||||
#define OPTIMIZER_SWITCH_JOIN_CACHE_BKA (1ULL << 24)
|
||||
#define OPTIMIZER_SWITCH_OPTIMIZE_JOIN_BUFFER_SIZE (1ULL << 25)
|
||||
#define OPTIMIZER_SWITCH_TABLE_ELIMINATION (1ULL << 26)
|
||||
#define OPTIMIZER_SWITCH_LAST (1ULL << 26)
|
||||
#define OPTIMIZER_SWITCH_EXTENDED_KEYS (1ULL << 27)
|
||||
#define OPTIMIZER_SWITCH_LAST (1ULL << 27)
|
||||
|
||||
#define OPTIMIZER_SWITCH_DEFAULT (OPTIMIZER_SWITCH_INDEX_MERGE | \
|
||||
OPTIMIZER_SWITCH_INDEX_MERGE_UNION | \
|
||||
|
@ -3421,11 +3421,13 @@ make_join_statistics(JOIN *join, List<TABLE_LIST> &tables_list,
|
||||
The effect of this is that we don't do const substitution for
|
||||
such tables.
|
||||
*/
|
||||
if (eq_part.is_prefix(table->key_info[key].key_parts) &&
|
||||
KEY *keyinfo= table->key_info + key;
|
||||
uint key_parts= table->actual_n_key_parts(keyinfo);
|
||||
if (eq_part.is_prefix(key_parts) &&
|
||||
!table->fulltext_searched &&
|
||||
(!embedding || (embedding->sj_on_expr && !embedding->embedding)))
|
||||
{
|
||||
if (table->key_info[key].flags & HA_NOSAME)
|
||||
if (table->actual_key_flags(keyinfo) & HA_NOSAME)
|
||||
{
|
||||
if (const_ref == eq_part &&
|
||||
!has_expensive_keyparts &&
|
||||
@ -4455,7 +4457,8 @@ add_key_part(DYNAMIC_ARRAY *keyuse_array, KEY_FIELD *key_field)
|
||||
if (form->key_info[key].flags & (HA_FULLTEXT | HA_SPATIAL))
|
||||
continue; // ToDo: ft-keys in non-ft queries. SerG
|
||||
|
||||
uint key_parts= (uint) form->key_info[key].key_parts;
|
||||
KEY *keyinfo= form->key_info+key;
|
||||
uint key_parts= form->actual_n_key_parts(keyinfo);
|
||||
for (uint part=0 ; part < key_parts ; part++)
|
||||
{
|
||||
if (field->eq(form->key_info[key].key_part[part].field))
|
||||
@ -5167,6 +5170,8 @@ best_access_path(JOIN *join,
|
||||
for (keyuse=s->keyuse ; keyuse->table == table ;)
|
||||
{
|
||||
KEY *keyinfo;
|
||||
ulong key_flags;
|
||||
uint key_parts;
|
||||
key_part_map found_part= 0;
|
||||
table_map found_ref= 0;
|
||||
uint key= keyuse->key;
|
||||
@ -5193,6 +5198,8 @@ best_access_path(JOIN *join,
|
||||
}
|
||||
|
||||
keyinfo= table->key_info+key;
|
||||
key_parts= table->actual_n_key_parts(keyinfo);
|
||||
key_flags= table->actual_key_flags(keyinfo);
|
||||
|
||||
/* Calculate how many key segments of the current key we can use */
|
||||
start_key= keyuse;
|
||||
@ -5271,11 +5278,11 @@ best_access_path(JOIN *join,
|
||||
loose_scan_opt.check_ref_access_part1(s, key, start_key, found_part);
|
||||
|
||||
/* Check if we found full key */
|
||||
if (found_part == PREV_BITS(uint,keyinfo->key_parts) &&
|
||||
if (found_part == PREV_BITS(uint, key_parts) &&
|
||||
!ref_or_null_part)
|
||||
{ /* use eq key */
|
||||
max_key_part= (uint) ~0;
|
||||
if ((keyinfo->flags & (HA_NOSAME | HA_NULL_PART_KEY)) == HA_NOSAME)
|
||||
if ((key_flags & (HA_NOSAME | HA_NULL_PART_KEY)) == HA_NOSAME)
|
||||
{
|
||||
tmp = prev_record_reads(join->positions, idx, found_ref);
|
||||
records=1.0;
|
||||
@ -5311,7 +5318,8 @@ best_access_path(JOIN *join,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(records=keyinfo->rec_per_key[keyinfo->key_parts-1]))
|
||||
uint key_parts= table->actual_n_key_parts(keyinfo);
|
||||
if (!(records=keyinfo->rec_per_key[key_parts-1]))
|
||||
{ /* Prefer longer keys */
|
||||
records=
|
||||
((double) s->records / (double) rec *
|
||||
@ -7387,6 +7395,7 @@ static bool create_hj_key_for_table(JOIN *join, JOIN_TAB *join_tab,
|
||||
key_parts)))
|
||||
DBUG_RETURN(TRUE);
|
||||
keyinfo->usable_key_parts= keyinfo->key_parts = key_parts;
|
||||
keyinfo->ext_key_parts= keyinfo->key_parts;
|
||||
keyinfo->key_part= key_part_info;
|
||||
keyinfo->key_length=0;
|
||||
keyinfo->algorithm= HA_KEY_ALG_UNDEF;
|
||||
@ -7429,6 +7438,10 @@ static bool create_hj_key_for_table(JOIN *join, JOIN_TAB *join_tab,
|
||||
keyuse++;
|
||||
} while (keyuse->table == table && keyuse->is_for_hash_join());
|
||||
|
||||
keyinfo->ext_key_parts= keyinfo->key_parts;
|
||||
keyinfo->ext_key_flags= keyinfo->flags;
|
||||
keyinfo->ext_key_part_map= 0;
|
||||
|
||||
join_tab->hj_key= keyinfo;
|
||||
|
||||
DBUG_RETURN(FALSE);
|
||||
@ -7620,8 +7633,11 @@ static bool create_ref_for_key(JOIN *join, JOIN_TAB *j,
|
||||
DBUG_RETURN(0);
|
||||
if (j->type == JT_CONST)
|
||||
j->table->const_table= 1;
|
||||
else if (((keyinfo->flags & (HA_NOSAME | HA_NULL_PART_KEY)) != HA_NOSAME) ||
|
||||
keyparts != keyinfo->key_parts || null_ref_key)
|
||||
else if (((j->table->actual_key_flags(keyinfo) &
|
||||
(HA_NOSAME | HA_NULL_PART_KEY))
|
||||
!= HA_NOSAME) ||
|
||||
keyparts != j->table->actual_n_key_parts(keyinfo) ||
|
||||
null_ref_key)
|
||||
{
|
||||
/* Must read with repeat */
|
||||
j->type= null_ref_key ? JT_REF_OR_NULL : JT_REF;
|
||||
@ -14265,7 +14281,9 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
|
||||
share->keys_in_use.set_bit(0);
|
||||
keyinfo->key_part=key_part_info;
|
||||
keyinfo->flags=HA_NOSAME | HA_BINARY_PACK_KEY | HA_PACK_KEY;
|
||||
keyinfo->ext_key_flags= keyinfo->flags;
|
||||
keyinfo->usable_key_parts=keyinfo->key_parts= param->group_parts;
|
||||
keyinfo->ext_key_parts= keyinfo->key_parts;
|
||||
keyinfo->key_length=0;
|
||||
keyinfo->rec_per_key=0;
|
||||
keyinfo->algorithm= HA_KEY_ALG_UNDEF;
|
||||
@ -14364,6 +14382,7 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
|
||||
null_pack_length-=hidden_null_pack_length;
|
||||
keyinfo->key_parts= ((field_count-param->hidden_field_count)+
|
||||
(share->uniques ? test(null_pack_length) : 0));
|
||||
keyinfo->ext_key_parts= keyinfo->key_parts;
|
||||
table->distinct= 1;
|
||||
share->keys= 1;
|
||||
if (!(key_part_info= (KEY_PART_INFO*)
|
||||
@ -14376,6 +14395,7 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
|
||||
table->key_info= table->s->key_info= keyinfo;
|
||||
keyinfo->key_part=key_part_info;
|
||||
keyinfo->flags=HA_NOSAME | HA_NULL_ARE_EQUAL | HA_BINARY_PACK_KEY | HA_PACK_KEY;
|
||||
keyinfo->ext_key_flags= keyinfo->flags;
|
||||
keyinfo->key_length= 0; // Will compute the sum of the parts below.
|
||||
keyinfo->name= (char*) "distinct_key";
|
||||
keyinfo->algorithm= HA_KEY_ALG_UNDEF;
|
||||
|
@ -90,6 +90,9 @@ typedef struct st_key {
|
||||
ulong flags; /* dupp key and pack flags */
|
||||
uint key_parts; /* How many key_parts */
|
||||
uint usable_key_parts; /* Should normally be = key_parts */
|
||||
uint ext_key_parts; /* Number of key parts in extended key */
|
||||
ulong ext_key_flags; /* Flags for extended key */
|
||||
key_part_map ext_key_part_map; /* Bitmap of pk key parts in extension */
|
||||
uint block_size;
|
||||
uint name_length;
|
||||
enum ha_key_alg algorithm;
|
||||
|
@ -1456,6 +1456,7 @@ export const char *optimizer_switch_names[]=
|
||||
"join_cache_bka",
|
||||
"optimize_join_buffer_size",
|
||||
"table_elimination",
|
||||
"extended_keys",
|
||||
"default", NullS
|
||||
};
|
||||
/** propagates changes to @@engine_condition_pushdown */
|
||||
@ -1496,7 +1497,8 @@ static Sys_var_flagset Sys_optimizer_switch(
|
||||
"semijoin, "
|
||||
"semijoin_with_cache, "
|
||||
"subquery_cache, "
|
||||
"table_elimination "
|
||||
"table_elimination, "
|
||||
"extended_keys "
|
||||
"} and val is one of {on, off, default}",
|
||||
SESSION_VAR(optimizer_switch), CMD_LINE(REQUIRED_ARG),
|
||||
optimizer_switch_names, DEFAULT(OPTIMIZER_SWITCH_DEFAULT),
|
||||
|
259
sql/table.cc
259
sql/table.cc
@ -753,10 +753,12 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
|
||||
uchar forminfo[288];
|
||||
uchar *record;
|
||||
uchar *disk_buff, *strpos, *null_flags, *null_pos;
|
||||
ulong pos, record_offset, *rec_per_key, rec_buff_length;
|
||||
ulong pos, record_offset;
|
||||
ulong *rec_per_key= NULL;
|
||||
ulong rec_buff_length;
|
||||
handler *handler_file= 0;
|
||||
KEY *keyinfo;
|
||||
KEY_PART_INFO *key_part;
|
||||
KEY_PART_INFO *key_part= NULL;
|
||||
SQL_CRYPT *crypted=0;
|
||||
Field **field_ptr, *reg_field;
|
||||
const char **interval_array;
|
||||
@ -767,6 +769,13 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
|
||||
char *vcol_screen_pos;
|
||||
uchar *UNINIT_VAR(options);
|
||||
uchar *extra_segment_buff= 0;
|
||||
KEY first_keyinfo;
|
||||
uint len;
|
||||
KEY_PART_INFO *first_key_part= NULL;
|
||||
uint ext_key_parts= 0;
|
||||
uint first_key_parts= 0;
|
||||
keyinfo= &first_keyinfo;
|
||||
share->ext_key_parts= 0;
|
||||
DBUG_ENTER("open_binary_frm");
|
||||
|
||||
new_field_pack_flag= head[27];
|
||||
@ -861,18 +870,37 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
|
||||
share->keys_for_keyread.init(0);
|
||||
share->keys_in_use.init(keys);
|
||||
|
||||
n_length=keys*sizeof(KEY)+key_parts*sizeof(KEY_PART_INFO);
|
||||
if (!(keyinfo = (KEY*) alloc_root(&share->mem_root,
|
||||
n_length + uint2korr(disk_buff+4))))
|
||||
goto err; /* purecov: inspected */
|
||||
bzero((char*) keyinfo,n_length);
|
||||
share->key_info= keyinfo;
|
||||
key_part= reinterpret_cast<KEY_PART_INFO*>(keyinfo+keys);
|
||||
strpos=disk_buff+6;
|
||||
/*
|
||||
At this point we don't have enough information read from the frm file
|
||||
to get a proper handlerton for the interesting engine in order to get
|
||||
properties of this engine.
|
||||
*/
|
||||
/* Currently only InnoDB can use extended keys */
|
||||
share->set_use_ext_keys_flag(legacy_db_type == DB_TYPE_INNODB);
|
||||
|
||||
if (!(rec_per_key= (ulong*) alloc_root(&share->mem_root,
|
||||
sizeof(ulong)*key_parts)))
|
||||
goto err;
|
||||
len= (uint) uint2korr(disk_buff+4);
|
||||
if (!keys)
|
||||
{
|
||||
if (!(keyinfo = (KEY*) alloc_root(&share->mem_root, len)))
|
||||
goto err;
|
||||
bzero((char*) keyinfo, len);
|
||||
key_part= reinterpret_cast<KEY_PART_INFO*> (keyinfo+keys);
|
||||
}
|
||||
strpos= disk_buff+6;
|
||||
|
||||
/*
|
||||
If share->use_ext_keys is set to TRUE we assume that any key
|
||||
can be extended by the components of the primary key whose
|
||||
definition is read first from the frm file.
|
||||
For each key only those fields of the assumed primary key are
|
||||
added that are not included in the proper key definition.
|
||||
If after all it turns out that there is no primary key the
|
||||
added components are removed from each key.
|
||||
|
||||
When in the future we support others schemes of extending of
|
||||
secondary keys with components of the primary key we'll have
|
||||
to change the type of this flag for an enumeration type.
|
||||
*/
|
||||
|
||||
for (i=0 ; i < keys ; i++, keyinfo++)
|
||||
{
|
||||
@ -894,6 +922,32 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
|
||||
strpos+=4;
|
||||
}
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
ext_key_parts= key_parts +
|
||||
(share->use_ext_keys ? first_keyinfo.key_parts*(keys-1) : 0);
|
||||
|
||||
n_length=keys * sizeof(KEY) + ext_key_parts * sizeof(KEY_PART_INFO);
|
||||
if (!(keyinfo= (KEY*) alloc_root(&share->mem_root,
|
||||
n_length + len)))
|
||||
goto err; /* purecov: inspected */
|
||||
bzero((char*) keyinfo,n_length);
|
||||
share->key_info= keyinfo;
|
||||
key_part= reinterpret_cast<KEY_PART_INFO*> (keyinfo + keys);
|
||||
|
||||
if (!(rec_per_key= (ulong*) alloc_root(&share->mem_root,
|
||||
sizeof(ulong) * ext_key_parts)))
|
||||
goto err;
|
||||
first_key_part= key_part;
|
||||
first_key_parts= first_keyinfo.key_parts;
|
||||
keyinfo->flags= first_keyinfo.flags;
|
||||
keyinfo->key_length= first_keyinfo.key_length;
|
||||
keyinfo->key_parts= first_keyinfo.key_parts;
|
||||
keyinfo->algorithm= first_keyinfo.algorithm;
|
||||
if (new_frm_ver >= 3)
|
||||
keyinfo->block_size= first_keyinfo.block_size;
|
||||
}
|
||||
|
||||
keyinfo->key_part= key_part;
|
||||
keyinfo->rec_per_key= rec_per_key;
|
||||
for (j=keyinfo->key_parts ; j-- ; key_part++)
|
||||
@ -922,6 +976,35 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
|
||||
}
|
||||
key_part->store_length=key_part->length;
|
||||
}
|
||||
keyinfo->ext_key_parts= keyinfo->key_parts;
|
||||
keyinfo->ext_key_flags= keyinfo->flags;
|
||||
keyinfo->ext_key_part_map= 0;
|
||||
if (share->use_ext_keys && i)
|
||||
{
|
||||
keyinfo->ext_key_flags= keyinfo->flags | HA_NOSAME;
|
||||
keyinfo->ext_key_part_map= 0;
|
||||
for (j= 0;
|
||||
j < first_key_parts && keyinfo->ext_key_parts < MAX_REF_PARTS;
|
||||
j++)
|
||||
{
|
||||
uint key_parts= keyinfo->key_parts;
|
||||
KEY_PART_INFO* curr_key_part= keyinfo->key_part;
|
||||
KEY_PART_INFO* curr_key_part_end= curr_key_part+key_parts;
|
||||
for ( ; curr_key_part < curr_key_part_end; curr_key_part++)
|
||||
{
|
||||
if (curr_key_part->fieldnr == first_key_part[j].fieldnr)
|
||||
break;
|
||||
}
|
||||
if (curr_key_part == curr_key_part_end)
|
||||
{
|
||||
*key_part++= first_key_part[j];
|
||||
*rec_per_key++= 0;
|
||||
keyinfo->ext_key_parts++;
|
||||
keyinfo->ext_key_part_map|= 1 << j;
|
||||
}
|
||||
}
|
||||
}
|
||||
share->ext_key_parts+= keyinfo->ext_key_parts;
|
||||
}
|
||||
keynames=(char*) key_part;
|
||||
strpos+= (strmov(keynames, (char *) strpos) - keynames)+1;
|
||||
@ -1522,11 +1605,38 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
|
||||
/* Fix key->name and key_part->field */
|
||||
if (key_parts)
|
||||
{
|
||||
uint add_first_key_parts= 0;
|
||||
uint primary_key=(uint) (find_type(primary_key_name, &share->keynames,
|
||||
FIND_TYPE_NO_PREFIX) - 1);
|
||||
longlong ha_option= handler_file->ha_table_flags();
|
||||
keyinfo= share->key_info;
|
||||
key_part= keyinfo->key_part;
|
||||
|
||||
if (share->use_ext_keys)
|
||||
{
|
||||
if (primary_key >= MAX_KEY)
|
||||
{
|
||||
add_first_key_parts= 0;
|
||||
share->set_use_ext_keys_flag(FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
add_first_key_parts= first_key_parts;
|
||||
/*
|
||||
Do not add components of the primary key starting from
|
||||
the major component defined over the beginning of a field.
|
||||
*/
|
||||
for (i= 0; i < first_key_parts; i++)
|
||||
{
|
||||
uint fieldnr= keyinfo[0].key_part[i].fieldnr;
|
||||
if (share->field[fieldnr-1]->key_length() !=
|
||||
keyinfo[0].key_part[i].length)
|
||||
{
|
||||
add_first_key_parts= i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (uint key=0 ; key < share->keys ; key++,keyinfo++)
|
||||
{
|
||||
@ -1545,6 +1655,51 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
|
||||
keyinfo->name_length+1);
|
||||
}
|
||||
|
||||
if (ext_key_parts > share->key_parts && key)
|
||||
{
|
||||
KEY_PART_INFO *new_key_part= (keyinfo-1)->key_part +
|
||||
(keyinfo-1)->ext_key_parts;
|
||||
|
||||
/*
|
||||
Do not extend the key that contains a component
|
||||
defined over the beginning of a field.
|
||||
*/
|
||||
for (i= 0; i < keyinfo->key_parts; i++)
|
||||
{
|
||||
uint fieldnr= keyinfo->key_part[i].fieldnr;
|
||||
if (share->field[fieldnr-1]->key_length() !=
|
||||
keyinfo->key_part[i].length)
|
||||
{
|
||||
add_first_key_parts= 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (add_first_key_parts < keyinfo->ext_key_parts-keyinfo->key_parts)
|
||||
{
|
||||
share->ext_key_parts-= keyinfo->ext_key_parts;
|
||||
key_part_map ext_key_part_map= keyinfo->ext_key_part_map;
|
||||
keyinfo->ext_key_parts= keyinfo->key_parts;
|
||||
keyinfo->ext_key_flags= keyinfo->flags;
|
||||
keyinfo->ext_key_part_map= 0;
|
||||
for (i= 0; i < add_first_key_parts; i++)
|
||||
{
|
||||
if (ext_key_part_map & 1<<i)
|
||||
{
|
||||
keyinfo->ext_key_part_map|= 1<<i;
|
||||
keyinfo->ext_key_parts++;
|
||||
}
|
||||
}
|
||||
share->ext_key_parts+= keyinfo->ext_key_parts;
|
||||
}
|
||||
if (new_key_part != keyinfo->key_part)
|
||||
{
|
||||
memmove(new_key_part, keyinfo->key_part,
|
||||
sizeof(KEY_PART_INFO) * keyinfo->ext_key_parts);
|
||||
keyinfo->key_part= new_key_part;
|
||||
}
|
||||
}
|
||||
|
||||
/* Fix fulltext keys for old .frm files */
|
||||
if (share->key_info[key].flags & HA_FULLTEXT)
|
||||
share->key_info[key].algorithm= HA_KEY_ALG_FULLTEXT;
|
||||
@ -1556,6 +1711,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
|
||||
declare this as a primary key.
|
||||
*/
|
||||
primary_key=key;
|
||||
key_part= keyinfo->key_part;
|
||||
for (i=0 ; i < keyinfo->key_parts ;i++)
|
||||
{
|
||||
uint fieldnr= key_part[i].fieldnr;
|
||||
@ -1570,7 +1726,10 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
|
||||
}
|
||||
}
|
||||
|
||||
for (i=0 ; i < keyinfo->key_parts ; key_part++,i++)
|
||||
key_part= keyinfo->key_part;
|
||||
uint key_parts= share->use_ext_keys ? keyinfo->ext_key_parts :
|
||||
keyinfo->key_parts;
|
||||
for (i=0; i < key_parts; key_part++, i++)
|
||||
{
|
||||
Field *field;
|
||||
if (new_field_pack_flag <= 1)
|
||||
@ -1622,7 +1781,8 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
|
||||
{
|
||||
share->keys_for_keyread.set_bit(key);
|
||||
field->part_of_key.set_bit(key);
|
||||
field->part_of_key_not_clustered.set_bit(key);
|
||||
if (i < keyinfo->key_parts)
|
||||
field->part_of_key_not_clustered.set_bit(key);
|
||||
}
|
||||
if (handler_file->index_flags(key, i, 1) & HA_READ_ORDER)
|
||||
field->part_of_sortkey.set_bit(key);
|
||||
@ -2261,7 +2421,7 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias,
|
||||
KEY *key_info, *key_info_end;
|
||||
KEY_PART_INFO *key_part;
|
||||
uint n_length;
|
||||
n_length= share->keys*sizeof(KEY) + share->key_parts*sizeof(KEY_PART_INFO);
|
||||
n_length= share->keys*sizeof(KEY) + share->ext_key_parts*sizeof(KEY_PART_INFO);
|
||||
if (!(key_info= (KEY*) alloc_root(&outparam->mem_root, n_length)))
|
||||
goto err;
|
||||
outparam->key_info= key_info;
|
||||
@ -2269,7 +2429,7 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias,
|
||||
|
||||
memcpy(key_info, share->key_info, sizeof(*key_info)*share->keys);
|
||||
memcpy(key_part, share->key_info[0].key_part, (sizeof(*key_part) *
|
||||
share->key_parts));
|
||||
share->ext_key_parts));
|
||||
|
||||
for (key_info_end= key_info + share->keys ;
|
||||
key_info < key_info_end ;
|
||||
@ -2280,11 +2440,11 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias,
|
||||
key_info->table= outparam;
|
||||
key_info->key_part= key_part;
|
||||
|
||||
for (key_part_end= key_part+ key_info->key_parts ;
|
||||
key_part < key_part_end ;
|
||||
key_part++)
|
||||
key_part_end= key_part + (share->use_ext_keys ? key_info->ext_key_parts :
|
||||
key_info->key_parts) ;
|
||||
for ( ; key_part < key_part_end; key_part++)
|
||||
{
|
||||
Field *field= key_part->field= outparam->field[key_part->fieldnr-1];
|
||||
Field *field= key_part->field= outparam->field[key_part->fieldnr - 1];
|
||||
|
||||
if (field->key_length() != key_part->length &&
|
||||
!(field->flags & BLOB_FLAG))
|
||||
@ -2298,6 +2458,8 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias,
|
||||
field->field_length= key_part->length;
|
||||
}
|
||||
}
|
||||
if (!share->use_ext_keys)
|
||||
key_part+= key_info->ext_key_parts - key_info->key_parts;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3225,7 +3387,7 @@ uint calculate_key_len(TABLE *table, uint key, const uchar *buf,
|
||||
|
||||
KEY *key_info= table->s->key_info+key;
|
||||
KEY_PART_INFO *key_part= key_info->key_part;
|
||||
KEY_PART_INFO *end_key_part= key_part + key_info->key_parts;
|
||||
KEY_PART_INFO *end_key_part= key_part + table->actual_n_key_parts(key_info);
|
||||
uint length= 0;
|
||||
|
||||
while (key_part < end_key_part && keypart_map)
|
||||
@ -5737,9 +5899,11 @@ bool TABLE::add_tmp_key(uint key, uint key_parts,
|
||||
keyinfo= key_info + key;
|
||||
keyinfo->key_part= key_part_info;
|
||||
keyinfo->usable_key_parts= keyinfo->key_parts = key_parts;
|
||||
keyinfo->ext_key_parts= keyinfo->key_parts;
|
||||
keyinfo->key_length=0;
|
||||
keyinfo->algorithm= HA_KEY_ALG_UNDEF;
|
||||
keyinfo->flags= HA_GENERATED_KEY;
|
||||
keyinfo->ext_key_flags= keyinfo->flags;
|
||||
if (unique)
|
||||
keyinfo->flags|= HA_NOSAME;
|
||||
sprintf(buf, "key%i", key);
|
||||
@ -5808,6 +5972,47 @@ bool TABLE::is_filled_at_execution()
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@brief
|
||||
Get actual number of key components
|
||||
|
||||
@param keyinfo
|
||||
|
||||
@details
|
||||
The function calculates actual number of key components, possibly including
|
||||
components of extended keys, taken into consideration by the optimizer for the
|
||||
key described by the parameter keyinfo.
|
||||
|
||||
@return number of considered key components
|
||||
*/
|
||||
|
||||
uint TABLE::actual_n_key_parts(KEY *keyinfo)
|
||||
{
|
||||
return optimizer_flag(in_use, OPTIMIZER_SWITCH_EXTENDED_KEYS) ?
|
||||
keyinfo->ext_key_parts : keyinfo->key_parts;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@brief
|
||||
Get actual key flags for a table key
|
||||
|
||||
@param keyinfo
|
||||
|
||||
@details
|
||||
The function finds out actual key flags taken into consideration by the
|
||||
optimizer for the key described by the parameter keyinfo.
|
||||
|
||||
@return actual key flags
|
||||
*/
|
||||
|
||||
ulong TABLE::actual_key_flags(KEY *keyinfo)
|
||||
{
|
||||
return optimizer_flag(in_use, OPTIMIZER_SWITCH_EXTENDED_KEYS) ?
|
||||
keyinfo->ext_key_flags : keyinfo->flags;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Cleanup this table for re-execution.
|
||||
|
||||
@ -6477,6 +6682,14 @@ bool TABLE_LIST::change_refs_to_fields()
|
||||
}
|
||||
|
||||
|
||||
uint TABLE_SHARE::actual_n_key_parts(THD *thd)
|
||||
{
|
||||
return use_ext_keys &&
|
||||
optimizer_flag(thd, OPTIMIZER_SWITCH_EXTENDED_KEYS) ?
|
||||
ext_key_parts : key_parts;
|
||||
}
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
** Instansiate templates
|
||||
*****************************************************************************/
|
||||
|
11
sql/table.h
11
sql/table.h
@ -639,6 +639,7 @@ struct TABLE_SHARE
|
||||
uint stored_fields;
|
||||
uint rec_buff_length; /* Size of table->record[] buffer */
|
||||
uint keys, key_parts;
|
||||
uint ext_key_parts; /* Total number of key parts in extended keys */
|
||||
uint max_key_length, max_unique_length, total_key_length;
|
||||
uint uniques; /* Number of UNIQUE index */
|
||||
uint null_fields; /* number of null fields */
|
||||
@ -658,6 +659,7 @@ struct TABLE_SHARE
|
||||
uint column_bitmap_size;
|
||||
uchar frm_version;
|
||||
uint vfields; /* Number of computed (virtual) fields */
|
||||
bool use_ext_keys; /* Extended keys can be used */
|
||||
bool null_field_first;
|
||||
bool system; /* Set if system table (one record) */
|
||||
bool crypted; /* If .frm file is crypted */
|
||||
@ -895,6 +897,13 @@ struct TABLE_SHARE
|
||||
uint deadlock_weight);
|
||||
/** Release resources and free memory occupied by the table share. */
|
||||
void destroy();
|
||||
|
||||
void set_use_ext_keys_flag(bool fl)
|
||||
{
|
||||
use_ext_keys= fl;
|
||||
}
|
||||
|
||||
uint actual_n_key_parts(THD *thd);
|
||||
};
|
||||
|
||||
|
||||
@ -1241,6 +1250,8 @@ public:
|
||||
}
|
||||
|
||||
bool update_const_key_parts(COND *conds);
|
||||
uint actual_n_key_parts(KEY *keyinfo);
|
||||
ulong actual_key_flags(KEY *keyinfo);
|
||||
};
|
||||
|
||||
|
||||
|
@ -8410,6 +8410,7 @@ ha_innobase::records_in_range(
|
||||
ib_int64_t n_rows;
|
||||
ulint mode1;
|
||||
ulint mode2;
|
||||
uint key_parts;
|
||||
mem_heap_t* heap;
|
||||
|
||||
DBUG_ENTER("records_in_range");
|
||||
@ -8445,14 +8446,19 @@ ha_innobase::records_in_range(
|
||||
goto func_exit;
|
||||
}
|
||||
|
||||
heap = mem_heap_create(2 * (key->key_parts * sizeof(dfield_t)
|
||||
key_parts= key->key_parts;
|
||||
if ((min_key && min_key->keypart_map>=(key_part_map) (1<<key_parts)) ||
|
||||
(max_key && max_key->keypart_map>=(key_part_map) (1<<key_parts)))
|
||||
key_parts= key->ext_key_parts;
|
||||
|
||||
heap = mem_heap_create(2 * (key_parts * sizeof(dfield_t)
|
||||
+ sizeof(dtuple_t)));
|
||||
|
||||
range_start = dtuple_create(heap, key->key_parts);
|
||||
dict_index_copy_types(range_start, index, key->key_parts);
|
||||
range_start= dtuple_create(heap, key_parts);
|
||||
dict_index_copy_types(range_start, index, key_parts);
|
||||
|
||||
range_end = dtuple_create(heap, key->key_parts);
|
||||
dict_index_copy_types(range_end, index, key->key_parts);
|
||||
range_end= dtuple_create(heap, key_parts);
|
||||
dict_index_copy_types(range_end, index, key_parts);
|
||||
|
||||
row_sel_convert_mysql_key_to_innobase(
|
||||
range_start, (byte*) key_val_buff,
|
||||
@ -8603,11 +8609,6 @@ ha_innobase::read_time(
|
||||
return(handler::read_time(index, ranges, rows));
|
||||
}
|
||||
|
||||
if (rows <= 2) {
|
||||
|
||||
return((double) rows);
|
||||
}
|
||||
|
||||
/* Assume that the read time is proportional to the scan time for all
|
||||
rows + at most one seek per range. */
|
||||
|
||||
@ -8997,6 +8998,7 @@ ha_innobase::info_low(
|
||||
|
||||
for (i = 0; i < table->s->keys; i++) {
|
||||
ulong j;
|
||||
rec_per_key = 1;
|
||||
/* We could get index quickly through internal
|
||||
index mapping with the index translation table.
|
||||
The identity of index (match up index name with
|
||||
@ -9050,6 +9052,50 @@ ha_innobase::info_low(
|
||||
rec_per_key >= ~(ulong) 0 ? ~(ulong) 0 :
|
||||
(ulong) rec_per_key;
|
||||
}
|
||||
|
||||
KEY *key_info= table->key_info+i;
|
||||
key_part_map ext_key_part_map=
|
||||
key_info->ext_key_part_map;
|
||||
|
||||
if (key_info->key_parts != key_info->ext_key_parts) {
|
||||
|
||||
KEY *pk_key_info= key_info+
|
||||
table->s->primary_key;
|
||||
uint k = key_info->key_parts;
|
||||
ha_rows k_rec_per_key = rec_per_key;
|
||||
uint pk_parts = pk_key_info->key_parts;
|
||||
|
||||
index= innobase_get_index(
|
||||
table->s->primary_key);
|
||||
|
||||
n_rows= ib_table->stat_n_rows;
|
||||
|
||||
for (j = 0; j < pk_parts; j++) {
|
||||
|
||||
if (ext_key_part_map & 1<<j) {
|
||||
|
||||
rec_per_key =
|
||||
innodb_rec_per_key(index,
|
||||
j, stats.records);
|
||||
|
||||
if (rec_per_key == 0) {
|
||||
rec_per_key = 1;
|
||||
}
|
||||
else if (rec_per_key > 1) {
|
||||
rec_per_key =
|
||||
k_rec_per_key *
|
||||
(double)rec_per_key /
|
||||
n_rows;
|
||||
}
|
||||
|
||||
key_info->rec_per_key[k++]=
|
||||
rec_per_key >= ~(ulong) 0 ?
|
||||
~(ulong) 0 :
|
||||
(ulong) rec_per_key;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dict_table_stats_unlock(ib_table, RW_S_LATCH);
|
||||
|
Loading…
x
Reference in New Issue
Block a user