3405 Oystein Grovlen 2011-09-07
WL#5285
Change optimizer_switch flag "batch_key_access" to
"batched_key_access".
Similar change for EXPLAIN output.
modified:
mysql-test/include/mrr_tests.inc
mysql-test/r/index_merge_myisam.result
mysql-test/r/innodb_mrr.result
mysql-test/r/innodb_mrr_all.result
mysql-test/r/innodb_mrr_cost.result
mysql-test/r/innodb_mrr_cost_all.result
mysql-test/r/innodb_mrr_cost_icp.result
mysql-test/r/innodb_mrr_icp.result
mysql-test/r/innodb_mrr_none.result
mysql-test/r/join_cache_bka.result
mysql-test/r/join_cache_bka_nobnl.result
mysql-test/r/join_cache_bkaunique.result
mysql-test/r/join_cache_nojb.result
mysql-test/r/join_nested_bka.result
mysql-test/r/join_nested_bka_nobnl.result
mysql-test/r/join_outer_bka.result
mysql-test/r/join_outer_bka_nobnl.result
mysql-test/r/myisam_mrr.result
mysql-test/r/myisam_mrr_all.result
mysql-test/r/myisam_mrr_cost.result
mysql-test/r/myisam_mrr_cost_all.result
mysql-test/r/myisam_mrr_cost_icp.result
mysql-test/r/myisam_mrr_icp.result
mysql-test/r/myisam_mrr_none.result
mysql-test/r/mysqld--help-notwin.result
mysql-test/r/mysqld--help-win.result
mysql-test/r/optimizer_switch.result
mysql-test/r/select_all_bka.result
mysql-test/r/select_all_bka_nobnl.result
mysql-test/r/select_icp_mrr_bka.result
mysql-test/r/select_icp_mrr_bka_nobnl.result
mysql-test/r/select_none_bka.result
mysql-test/r/select_none_bka_nobnl.result
mysql-test/r/subquery_all_bka.result
mysql-test/r/subquery_all_bka_nobnl.result
mysql-test/r/subquery_nomat_nosj_bka.result
mysql-test/r/subquery_nomat_nosj_bka_nobnl.result
mysql-test/r/subquery_none_bka.result
mysql-test/r/subquery_none_bka_nobnl.result
mysql-test/r/subquery_sj_all_bka.result
mysql-test/r/subquery_sj_all_bka_nobnl.result
mysql-test/r/subquery_sj_all_bkaunique.result
mysql-test/r/subquery_sj_dupsweed_bka.result
mysql-test/r/subquery_sj_dupsweed_bka_nobnl.result
mysql-test/r/subquery_sj_dupsweed_bkaunique.result
mysql-test/r/subquery_sj_firstmatch.result
mysql-test/r/subquery_sj_firstmatch_bka.result
mysql-test/r/subquery_sj_firstmatch_bka_nobnl.result
mysql-test/r/subquery_sj_firstmatch_bkaunique.result
mysql-test/r/subquery_sj_innodb_all_bka.result
mysql-test/r/subquery_sj_innodb_all_bka_nobnl.result
mysql-test/r/subquery_sj_innodb_all_bkaunique.result
mysql-test/r/subquery_sj_innodb_none_bka.result
mysql-test/r/subquery_sj_innodb_none_bka_nobnl.result
mysql-test/r/subquery_sj_innodb_none_bkaunique.result
mysql-test/r/subquery_sj_loosescan_bka.result
mysql-test/r/subquery_sj_loosescan_bka_nobnl.result
mysql-test/r/subquery_sj_loosescan_bkaunique.result
mysql-test/r/subquery_sj_mat_bka.result
mysql-test/r/subquery_sj_mat_bka_nobnl.result
mysql-test/r/subquery_sj_mat_bkaunique.result
mysql-test/r/subquery_sj_none_bka.result
mysql-test/r/subquery_sj_none_bka_nobnl.result
mysql-test/r/subquery_sj_none_bkaunique.result
mysql-test/suite/sys_vars/r/optimizer_switch_basic.result
mysql-test/t/join_cache_bka.test
mysql-test/t/join_cache_bka_nobnl.test
mysql-test/t/join_cache_bkaunique.test
mysql-test/t/join_cache_nojb.test
mysql-test/t/join_nested_bka.test
mysql-test/t/join_nested_bka_nobnl.test
mysql-test/t/join_outer_bka.test
mysql-test/t/join_outer_bka_nobnl.test
mysql-test/t/select_all_bka.test
mysql-test/t/select_all_bka_nobnl.test
mysql-test/t/select_icp_mrr_bka.test
mysql-test/t/select_icp_mrr_bka_nobnl.test
mysql-test/t/select_none_bka.test
mysql-test/t/select_none_bka_nobnl.test
mysql-test/t/subquery_all_bka.test
mysql-test/t/subquery_all_bka_nobnl.test
mysql-test/t/subquery_nomat_nosj_bka.test
mysql-test/t/subquery_nomat_nosj_bka_nobnl.test
mysql-test/t/subquery_none_bka.test
mysql-test/t/subquery_none_bka_nobnl.test
mysql-test/t/subquery_sj_all_bka.test
mysql-test/t/subquery_sj_all_bka_nobnl.test
mysql-test/t/subquery_sj_all_bkaunique.test
mysql-test/t/subquery_sj_dupsweed_bka.test
mysql-test/t/subquery_sj_dupsweed_bka_nobnl.test
mysql-test/t/subquery_sj_dupsweed_bkaunique.test
mysql-test/t/subquery_sj_firstmatch.test
mysql-test/t/subquery_sj_firstmatch_bka.test
mysql-test/t/subquery_sj_firstmatch_bka_nobnl.test
mysql-test/t/subquery_sj_firstmatch_bkaunique.test
mysql-test/t/subquery_sj_innodb_all_bka.test
mysql-test/t/subquery_sj_innodb_all_bka_nobnl.test
mysql-test/t/subquery_sj_innodb_all_bkaunique.test
mysql-test/t/subquery_sj_innodb_none_bka.test
mysql-test/t/subquery_sj_innodb_none_bka_nobnl.test
mysql-test/t/subquery_sj_innodb_none_bkaunique.test
mysql-test/t/subquery_sj_loosescan_bka.test
mysql-test/t/subquery_sj_loosescan_bka_nobnl.test
mysql-test/t/subquery_sj_loosescan_bkaunique.test
mysql-test/t/subquery_sj_mat_bka.test
mysql-test/t/subquery_sj_mat_bka_nobnl.test
mysql-test/t/subquery_sj_mat_bkaunique.test
mysql-test/t/subquery_sj_none_bka.test
mysql-test/t/subquery_sj_none_bka_nobnl.test
mysql-test/t/subquery_sj_none_bkaunique.test
sql/opt_explain.cc
sql/sql_select.cc
sql/sys_vars.cc
3404 Guilhem Bichot 2011-08-31
1) fix for BUG#12905521 - ASSERT IN OPT_TRACE_STMT::SYNTAX_ERROR ON SELECT DISTINCT/MIN/JOIN/SUBQ QUERY
(bug when evaluating subq in GROUP BY)
and BUG#12905758 - ASSERT IN OPT_TRACE_STMT::SYNTAX_ERROR ON SELECT/SUBQ/SUM QUERY
(bug when evaluating subq in ORDER BY)
2) to avoid such bugs in the future, we don't crash anymore in case of json syntax error;
instead, we now always produce valid syntax, by omitting a superfluous key, or
autogenerating a needed key.
@ mysql-test/suite/opt_trace/include/subquery.inc
sorry the SELECT is in lowercase, it's because it originally had table names in uppercase,
which makes a non-repeatable test output (uppercase on Unix, lowercase on Windows),
so I changed everything to lowercase.
Need to disable semijoin, so that tracing does not depend on whether
the build supports semijoin or not.
@ mysql-test/suite/opt_trace/r/subquery_no_prot.result
see the "clause_processing" for the two new tests: it evaluates the subq.
@ sql/opt_trace.cc
* make_unknown_key() produces a dummy key when a key is needed,
this key has a growing numeric suffix for uniqueness
* Opt_trace_stmt::open_struct() had code similar to
that of Opt_trace_stmt::add(); the first now calls the second
* thus, the check_key() calls can all be moved into
Opt_trace_stmt::add().
* syntax_error() not needed anymore as we don't emit syntax
errors now.
@ sql/opt_trace.h
syntax_error() is removed so its informative comment moves to check_key()
@ sql/sql_select.cc
When GROUP BY or ORDER BY contains a subquery which is constant, it is evaluated
in remove_const(); so subq tracing was emitted: this starts as an anonymous
object (with no key), alas it is inside an object which requires keys
(like "item", "uses_only_constant_tables").
The fix is to open a wrapper array around subq evaluation.
This place of code is found similar to other existing ones, so they get
the same name: "subselect_evaluation". The old names like
"subselect_equality_propagation" were:
- maybe incorrect (looking in result files, "subselect_equality_propagation"
seems to evaluate the subq, not only propagate equalities into it)
- unnecessarily precise ("subselect_equality_propagation" is inside
a wrapper object which already says "equality_propagation").
After all they are all about evaluating a subq.
@ unittest/gunit/opt_trace-t.cc
* no more assert on syntax error
* trace is json-compliant now
modified:
mysql-test/suite/opt_trace/include/subquery.inc
mysql-test/suite/opt_trace/r/bugs_no_prot_all.result
mysql-test/suite/opt_trace/r/bugs_no_prot_none.result
mysql-test/suite/opt_trace/r/bugs_ps_prot_all.result
mysql-test/suite/opt_trace/r/bugs_ps_prot_none.result
mysql-test/suite/opt_trace/r/general2_no_prot.result
mysql-test/suite/opt_trace/r/general2_ps_prot.result
mysql-test/suite/opt_trace/r/general_no_prot_all.result
mysql-test/suite/opt_trace/r/general_no_prot_none.result
mysql-test/suite/opt_trace/r/general_ps_prot_all.result
mysql-test/suite/opt_trace/r/general_ps_prot_none.result
mysql-test/suite/opt_trace/r/range_no_prot.result
mysql-test/suite/opt_trace/r/range_ps_prot.result
mysql-test/suite/opt_trace/r/subquery_no_prot.result
mysql-test/suite/opt_trace/r/subquery_ps_prot.result
sql/opt_trace.cc
sql/opt_trace.h
sql/sql_select.cc
unittest/gunit/opt_trace-t.cc
=== modified file 'mysql-test/include/mrr_tests.inc'
--- a/mysql-test/include/mrr_tests.inc 2011-08-08 14:16:20 +0000
+++ b/mysql-test/include/mrr_tests.inc 2011-09-07 10:21:50 +0000
@@ -394,7 +394,7 @@ DROP TABLE t1, t2;
# This test should run without join buffering
set @save_optimizer_switch = @@optimizer_switch;
-set optimizer_switch='block_nested_loop=off,batch_key_access=off';
+set optimizer_switch='block_nested_loop=off,batched_key_access=off';
CREATE TABLE t1 (
pk INTEGER,
=== modified file 'mysql-test/r/index_merge_myisam.result'
--- a/mysql-test/r/index_merge_myisam.result 2011-08-19 11:39:15 +0000
+++ b/mysql-test/r/index_merge_myisam.result 2011-09-07 10:21:50 +0000
@@ -1492,19 +1492,19 @@ DROP TABLE t1,t2;
#
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off
set optimizer_switch='index_merge=off,index_merge_union=off';
select @@optimizer_switch;
@@optimizer_switch
-index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off
+index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off
set optimizer_switch='index_merge_union=on';
select @@optimizer_switch;
@@optimizer_switch
-index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off
+index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off
set optimizer_switch='default,index_merge_sort_union=off';
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off
set optimizer_switch=4;
set optimizer_switch=NULL;
ERROR 42000: Variable 'optimizer_switch' can't be set to the value of 'NULL'
@@ -1530,21 +1530,21 @@ set optimizer_switch=default;
set optimizer_switch='index_merge=off,index_merge_union=off,default';
select @@optimizer_switch;
@@optimizer_switch
-index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off
+index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off
set optimizer_switch=default;
select @@global.optimizer_switch;
@@global.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off
set @@global.optimizer_switch=default;
select @@global.optimizer_switch;
@@global.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off
#
# Check index_merge's @@optimizer_switch flags
#
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1 (a int, b int, c int, filler char(100),
@@ -1654,5 +1654,5 @@ id select_type table type possible_keys
set optimizer_switch=default;
show 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,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off
+optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off
drop table t0, t1;
=== modified file 'mysql-test/r/innodb_mrr.result'
--- a/mysql-test/r/innodb_mrr.result 2011-08-08 14:16:20 +0000
+++ b/mysql-test/r/innodb_mrr.result 2011-09-07 10:21:50 +0000
@@ -549,7 +549,7 @@ DROP TABLE t1, t2;
# Bug#12321461: CRASH IN DSMRR_IMPL::DSMRR_INIT ON SELECT STRAIGHT_JOIN
#
set @save_optimizer_switch = @@optimizer_switch;
-set optimizer_switch='block_nested_loop=off,batch_key_access=off';
+set optimizer_switch='block_nested_loop=off,batched_key_access=off';
CREATE TABLE t1 (
pk INTEGER,
c1 VARCHAR(1) NOT NULL,
=== modified file 'mysql-test/r/innodb_mrr_all.result'
--- a/mysql-test/r/innodb_mrr_all.result 2011-08-08 14:16:20 +0000
+++ b/mysql-test/r/innodb_mrr_all.result 2011-09-07 10:21:50 +0000
@@ -549,7 +549,7 @@ DROP TABLE t1, t2;
# Bug#12321461: CRASH IN DSMRR_IMPL::DSMRR_INIT ON SELECT STRAIGHT_JOIN
#
set @save_optimizer_switch = @@optimizer_switch;
-set optimizer_switch='block_nested_loop=off,batch_key_access=off';
+set optimizer_switch='block_nested_loop=off,batched_key_access=off';
CREATE TABLE t1 (
pk INTEGER,
c1 VARCHAR(1) NOT NULL,
=== modified file 'mysql-test/r/innodb_mrr_cost.result'
--- a/mysql-test/r/innodb_mrr_cost.result 2011-08-08 14:16:20 +0000
+++ b/mysql-test/r/innodb_mrr_cost.result 2011-09-07 10:21:50 +0000
@@ -549,7 +549,7 @@ DROP TABLE t1, t2;
# Bug#12321461: CRASH IN DSMRR_IMPL::DSMRR_INIT ON SELECT STRAIGHT_JOIN
#
set @save_optimizer_switch = @@optimizer_switch;
-set optimizer_switch='block_nested_loop=off,batch_key_access=off';
+set optimizer_switch='block_nested_loop=off,batched_key_access=off';
CREATE TABLE t1 (
pk INTEGER,
c1 VARCHAR(1) NOT NULL,
=== modified file 'mysql-test/r/innodb_mrr_cost_all.result'
--- a/mysql-test/r/innodb_mrr_cost_all.result 2011-08-08 14:16:20 +0000
+++ b/mysql-test/r/innodb_mrr_cost_all.result 2011-09-07 10:21:50 +0000
@@ -549,7 +549,7 @@ DROP TABLE t1, t2;
# Bug#12321461: CRASH IN DSMRR_IMPL::DSMRR_INIT ON SELECT STRAIGHT_JOIN
#
set @save_optimizer_switch = @@optimizer_switch;
-set optimizer_switch='block_nested_loop=off,batch_key_access=off';
+set optimizer_switch='block_nested_loop=off,batched_key_access=off';
CREATE TABLE t1 (
pk INTEGER,
c1 VARCHAR(1) NOT NULL,
=== modified file 'mysql-test/r/innodb_mrr_cost_icp.result'
--- a/mysql-test/r/innodb_mrr_cost_icp.result 2011-08-08 14:16:20 +0000
+++ b/mysql-test/r/innodb_mrr_cost_icp.result 2011-09-07 10:21:50 +0000
@@ -549,7 +549,7 @@ DROP TABLE t1, t2;
# Bug#12321461: CRASH IN DSMRR_IMPL::DSMRR_INIT ON SELECT STRAIGHT_JOIN
#
set @save_optimizer_switch = @@optimizer_switch;
-set optimizer_switch='block_nested_loop=off,batch_key_access=off';
+set optimizer_switch='block_nested_loop=off,batched_key_access=off';
CREATE TABLE t1 (
pk INTEGER,
c1 VARCHAR(1) NOT NULL,
=== modified file 'mysql-test/r/innodb_mrr_icp.result'
--- a/mysql-test/r/innodb_mrr_icp.result 2011-08-08 14:16:20 +0000
+++ b/mysql-test/r/innodb_mrr_icp.result 2011-09-07 10:21:50 +0000
@@ -549,7 +549,7 @@ DROP TABLE t1, t2;
# Bug#12321461: CRASH IN DSMRR_IMPL::DSMRR_INIT ON SELECT STRAIGHT_JOIN
#
set @save_optimizer_switch = @@optimizer_switch;
-set optimizer_switch='block_nested_loop=off,batch_key_access=off';
+set optimizer_switch='block_nested_loop=off,batched_key_access=off';
CREATE TABLE t1 (
pk INTEGER,
c1 VARCHAR(1) NOT NULL,
=== modified file 'mysql-test/r/innodb_mrr_none.result'
--- a/mysql-test/r/innodb_mrr_none.result 2011-08-08 14:16:20 +0000
+++ b/mysql-test/r/innodb_mrr_none.result 2011-09-07 10:21:50 +0000
@@ -548,7 +548,7 @@ DROP TABLE t1, t2;
# Bug#12321461: CRASH IN DSMRR_IMPL::DSMRR_INIT ON SELECT STRAIGHT_JOIN
#
set @save_optimizer_switch = @@optimizer_switch;
-set optimizer_switch='block_nested_loop=off,batch_key_access=off';
+set optimizer_switch='block_nested_loop=off,batched_key_access=off';
CREATE TABLE t1 (
pk INTEGER,
c1 VARCHAR(1) NOT NULL,
=== modified file 'mysql-test/r/join_cache_bka.result'
--- a/mysql-test/r/join_cache_bka.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/join_cache_bka.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11;
DROP DATABASE IF EXISTS world;
set names utf8;
@@ -447,7 +447,7 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Using MRR
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (Batched Key Access)
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -476,8 +476,8 @@ City.Name LIKE 'L%' AND Country.Populati
CountryLanguage.Percentage > 50;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (Batch Key Access)
-1 SIMPLE City ref Country Country 3 world.Country.Code 18 Using index condition; Using where; Using join buffer (Batch Key Access)
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (Batched Key Access)
+1 SIMPLE City ref Country Country 3 world.Country.Code 18 Using index condition; Using where; Using join buffer (Batched Key Access)
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -659,7 +659,7 @@ WHERE
Country.Population > 10000000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country ALL NULL NULL NULL NULL 239 Using where
-1 SIMPLE CountryLanguage eq_ref PRIMARY PRIMARY 33 world.Country.Code,const 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE CountryLanguage eq_ref PRIMARY PRIMARY 33 world.Country.Code,const 1 Using where; Using join buffer (Batched Key Access)
SELECT Country.Name, IF(ISNULL(CountryLanguage.Country), NULL, CountryLanguage.Percentage)
FROM Country LEFT JOIN CountryLanguage ON
(CountryLanguage.Country=Country.Code AND Language='English')
@@ -754,7 +754,7 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Using MRR
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (Batched Key Access)
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -783,8 +783,8 @@ City.Name LIKE 'L%' AND Country.Populati
CountryLanguage.Percentage > 50;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (Batch Key Access)
-1 SIMPLE City ref Country Country 3 world.Country.Code 18 Using index condition; Using where; Using join buffer (Batch Key Access)
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (Batched Key Access)
+1 SIMPLE City ref Country Country 3 world.Country.Code 18 Using index condition; Using where; Using join buffer (Batched Key Access)
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -1017,7 +1017,7 @@ SELECT City.Name, Country.Name FROM City
WHERE City.Country=Country.Code AND City.Population > 3000000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Population,Country Population 4 NULL # Using index condition; Using MRR
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country # Using join buffer (Batch Key Access)
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country # Using join buffer (Batched Key Access)
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND City.Population > 3000000;
Name Name
@@ -1303,14 +1303,14 @@ t1.metaid = t2.metaid AND t1.affiliateid
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t6 system PRIMARY NULL NULL NULL 1
1 SIMPLE t1 ref t1_affiliateid,t1_metaid t1_affiliateid 4 const 1
-1 SIMPLE t4 ref PRIMARY,t4_formatclassid,t4_formats_idx t4_formats_idx 1 const 1 Using index condition; Using where; Using join buffer (Batch Key Access)
-1 SIMPLE t5 eq_ref PRIMARY,t5_formattypeid PRIMARY 4 test.t4.formatclassid 1 Using where; Using join buffer (Batch Key Access)
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.metaid 1 Using join buffer (Batch Key Access)
+1 SIMPLE t4 ref PRIMARY,t4_formatclassid,t4_formats_idx t4_formats_idx 1 const 1 Using index condition; Using where; Using join buffer (Batched Key Access)
+1 SIMPLE t5 eq_ref PRIMARY,t5_formattypeid PRIMARY 4 test.t4.formatclassid 1 Using where; Using join buffer (Batched Key Access)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.metaid 1 Using join buffer (Batched Key Access)
1 SIMPLE t7 ref PRIMARY PRIMARY 4 test.t1.metaid 1 Using index
-1 SIMPLE t8 eq_ref PRIMARY PRIMARY 4 test.t7.artistid 1 Using join buffer (Batch Key Access)
-1 SIMPLE t9 ref PRIMARY,t9_subgenreid,t9_metaid t9_metaid 4 test.t7.metaid 2 Using index condition; Using join buffer (Batch Key Access)
-1 SIMPLE t10 eq_ref PRIMARY,t10_genreid PRIMARY 4 test.t9.subgenreid 1 Using join buffer (Batch Key Access)
-1 SIMPLE t11 eq_ref PRIMARY PRIMARY 4 test.t10.genreid 1 Using join buffer (Batch Key Access)
+1 SIMPLE t8 eq_ref PRIMARY PRIMARY 4 test.t7.artistid 1 Using join buffer (Batched Key Access)
+1 SIMPLE t9 ref PRIMARY,t9_subgenreid,t9_metaid t9_metaid 4 test.t7.metaid 2 Using index condition; Using join buffer (Batched Key Access)
+1 SIMPLE t10 eq_ref PRIMARY,t10_genreid PRIMARY 4 test.t9.subgenreid 1 Using join buffer (Batched Key Access)
+1 SIMPLE t11 eq_ref PRIMARY PRIMARY 4 test.t10.genreid 1 Using join buffer (Batched Key Access)
1 SIMPLE t3 ALL t3_metaid,t3_formatid,t3_metaidformatid NULL NULL NULL 2 Using where; Using join buffer (Block Nested Loop)
SELECT t1.uniquekey, t1.xml AS affiliateXml,
t8.name AS artistName, t8.artistid,
@@ -1363,7 +1363,7 @@ FROM t1,t2,t3 WHERE a1=a2 AND b2=b3 AND
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 9 Using where
1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a1 1 Using index
-1 SIMPLE t3 ref idx idx 5 test.t2.b2 5 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t3 ref idx idx 5 test.t2.b2 5 Using where; Using join buffer (Batched Key Access)
SELECT a1<>a2, a1, a2, b2, b3, c3,
SUBSTR(filler1,1,1) AS s1, SUBSTR(filler2,1,1) AS s2
FROM t1,t2,t3 WHERE a1=a2 AND b2=b3 AND MOD(c3,10)>7;
@@ -1390,7 +1390,7 @@ FROM t1,t2,t3 WHERE a1=a2 AND b2=b3 AND
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 9 Using where
1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a1 1 Using index
-1 SIMPLE t3 ref idx idx 5 test.t2.b2 5 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t3 ref idx idx 5 test.t2.b2 5 Using where; Using join buffer (Batched Key Access)
SELECT a1<>a2, a1, a2, b2, b3, c3,
SUBSTR(filler1,1,1) AS s1, SUBSTR(filler2,1,1) AS s2
FROM t1,t2,t3 WHERE a1=a2 AND b2=b3 AND MOD(c3,10)>7;
@@ -1421,7 +1421,7 @@ Warning 1292 Truncated incorrect join_bu
EXPLAIN SELECT * FROM t1,t2 WHERE t1.a=t2.a AND t1.b >= 30;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL idx NULL NULL NULL 7 Using where
-1 SIMPLE t2 ref idx idx 5 test.t1.a 2 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref idx idx 5 test.t1.a 2 Using join buffer (Batched Key Access)
SELECT * FROM t1,t2 WHERE t1.a=t2.a AND t1.b >= 30;
a b a b
7 40 7 10
@@ -1570,7 +1570,7 @@ set join_buffer_size=1024;
EXPLAIN SELECT AVG(c) FROM t1,t2 WHERE t1.a=t2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2050 Using where
-1 SIMPLE t2 ref idx idx 5 test.t1.a 640 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref idx idx 5 test.t1.a 640 Using join buffer (Batched Key Access)
SELECT AVG(c) FROM t1,t2 WHERE t1.a=t2.b;
AVG(c)
5.0000
@@ -1608,8 +1608,8 @@ WHERE t1.a=t2.a AND t2.a=t3.a AND
t1.b IS NULL AND t2.b IS NULL AND t3.b IS NULL;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16384 Using where
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where; Using join buffer (Batch Key Access)
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where; Using join buffer (Batched Key Access)
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where; Using join buffer (Batched Key Access)
SELECT COUNT(*) FROM t1,t2,t3
WHERE t1.a=t2.a AND t2.a=t3.a AND
t1.b IS NULL AND t2.b IS NULL AND t3.b IS NULL;
@@ -1671,7 +1671,7 @@ WHERE t1.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL 2 Using index
1 SIMPLE t2 ref PRIMARY PRIMARY 8 test.t1.a 1 Using index
-1 SIMPLE t3 ref idx idx 16 test.t1.a,test.t2.b 2 Using join buffer (Batch Key Access)
+1 SIMPLE t3 ref idx idx 16 test.t1.a,test.t2.b 2 Using join buffer (Batched Key Access)
SELECT t1.a, t2.a, t3.a, t2.b, t3.b, t3.val
FROM (t1,t2) LEFT JOIN t3 ON (t1.a=t3.a AND t2.b=t3.b)
WHERE t1.a=t2.a;
@@ -1739,7 +1739,7 @@ explain select t2.f1, t2.f2, t2.f3 from
where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
-1 SIMPLE t2 ref f1 f1 4 test.t1.f1 3 Using index condition; Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref f1 f1 4 test.t1.f1 3 Using index condition; Using join buffer (Batched Key Access)
drop table t1,t2;
#
# Bug #42955: join with GROUP BY/ORDER BY and when BKA is enabled
@@ -1756,7 +1756,7 @@ select t1.id1, sum(t2.id2) from t1 join
where t1.d=3 group by t1.id1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref idx1 idx1 5 const 4 Using where; Using index; Using temporary; Using filesort
-1 SIMPLE t2 ref idx2 idx2 5 test.t1.id1 2 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref idx2 idx2 5 test.t1.id1 2 Using join buffer (Batched Key Access)
select t1.id1, sum(t2.id2) from t1 join t2 on t1.id1=t2.id1
where t1.d=3 group by t1.id1;
id1 sum(t2.id2)
@@ -1768,7 +1768,7 @@ select t1.id1 from t1 join t2 on t1.id1
where t1.d=3 and t2.id2 > 200 order by t1.id1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref idx1 idx1 5 const 4 Using where; Using index; Using temporary; Using filesort
-1 SIMPLE t2 ref idx2 idx2 5 test.t1.id1 2 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref idx2 idx2 5 test.t1.id1 2 Using where; Using join buffer (Batched Key Access)
select t1.id1 from t1 join t2 on t1.id1=t2.id1
where t1.d=3 and t2.id2 > 200 order by t1.id1;
id1
@@ -1810,9 +1810,9 @@ select t1.a, t1.b, t1.c, t1.d, t2.e, t3.
where t2.b=t1.b and t3.d=t1.d and t4.c=t1.c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where
-1 SIMPLE t2 ref idx idx 5 test.t1.b 1 Using join buffer (Batch Key Access)
-1 SIMPLE t3 ref idx idx 5 test.t1.d 1 Using join buffer (Batch Key Access)
-1 SIMPLE t4 ref idx idx 5 test.t1.c 1 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref idx idx 5 test.t1.b 1 Using join buffer (Batched Key Access)
+1 SIMPLE t3 ref idx idx 5 test.t1.d 1 Using join buffer (Batched Key Access)
+1 SIMPLE t4 ref idx idx 5 test.t1.c 1 Using join buffer (Batched Key Access)
select t1.a, t1.b, t1.c, t1.d, t2.e, t3.f, t4.g from t1,t2,t3,t4
where t2.b=t1.b and t3.d=t1.d and t4.c=t1.c;
a b c d e f g
@@ -1859,10 +1859,10 @@ WHERE t1.id1=t5.id1 AND t1.id2=t5.id2 an
t5.enum2='Active' AND t3.id4=t2.id4 AND t2.id3=t1.id3 AND t3.text1<'D';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 349 Using where
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.id3 1 Using where; Using join buffer (Batch Key Access)
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.id4 1 Using where; Using join buffer (Batch Key Access)
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t1.id2 1 Using join buffer (Batch Key Access)
-1 SIMPLE t5 eq_ref PRIMARY PRIMARY 16 test.t1.id1,test.t1.id2 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.id3 1 Using where; Using join buffer (Batched Key Access)
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.id4 1 Using where; Using join buffer (Batched Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t1.id2 1 Using join buffer (Batched Key Access)
+1 SIMPLE t5 eq_ref PRIMARY PRIMARY 16 test.t1.id1,test.t1.id2 1 Using where; Using join buffer (Batched Key Access)
SELECT STRAIGHT_JOIN t1.id1, t1.num3, t3.text1, t3.id4, t2.id3, t4.dummy
FROM t1 JOIN t2 JOIN t3 JOIN t4 JOIN t5
WHERE t1.id1=t5.id1 AND t1.id2=t5.id2 and t4.id2=t1.id2 AND
@@ -2132,7 +2132,7 @@ INSERT INTO t2 VALUES (100,NULL),(150,20
EXPLAIN SELECT t2.a FROM t1 LEFT JOIN t2 FORCE INDEX (b) ON t2.b = t1.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
-1 SIMPLE t2 ref b b 5 test.t1.b 2 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref b b 5 test.t1.b 2 Using join buffer (Batched Key Access)
SELECT t2.a FROM t1 LEFT JOIN t2 FORCE INDEX (b) ON t2.b = t1.b;
a
NULL
@@ -2142,7 +2142,7 @@ INSERT INTO t1 VALUES (NULL),(NULL);
EXPLAIN SELECT t2.a FROM t1 LEFT JOIN t2 FORCE INDEX (b) ON t2.b = t1.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
-1 SIMPLE t2 ref b b 5 test.t1.b 2 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref b b 5 test.t1.b 2 Using join buffer (Batched Key Access)
SELECT t2.a FROM t1 LEFT JOIN t2 FORCE INDEX (b) ON t2.b = t1.b;
a
NULL
@@ -2180,7 +2180,7 @@ where table3 .`pk` and table3 .`col_int_
and table3 .`col_varchar_key` = table2 .`col_varchar_nokey`;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE table2 ALL NULL NULL NULL NULL 2 Using where
-1 SIMPLE table3 ref col_varchar_key col_varchar_key 4 test.table2.col_varchar_nokey 1 Using index condition; Using where; Using join buffer (Batch Key Access)
+1 SIMPLE table3 ref col_varchar_key col_varchar_key 4 test.table2.col_varchar_nokey 1 Using index condition; Using where; Using join buffer (Batched Key Access)
SELECT table2 .`col_int_key` FROM t1 table2,
t1 table3 force index (`col_varchar_key`)
where table3 .`pk` and table3 .`col_int_key` >= table2 .`pk`
@@ -2216,7 +2216,7 @@ ORDER BY t1.col_int_key, t1.col_datetime
LIMIT 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using temporary; Using filesort
-1 SIMPLE t2 ref col_int_key col_int_key 5 const 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref col_int_key col_int_key 5 const 1 Using where; Using join buffer (Batched Key Access)
SELECT t1.col_int_key, t1.col_datetime
FROM t1,t2
WHERE t2.col_int_key = 1 AND t2.col_int >= 3
@@ -2313,7 +2313,7 @@ INSERT INTO t2 VALUES (100,0),(150,200),
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b = t1.t1b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
-1 SIMPLE t2 ref idx idx 5 test.t1.t1b 2 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref idx idx 5 test.t1.t1b 2 Using join buffer (Batched Key Access)
SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b = t1.t1b;
t1a t1b t2a t2b
99 0 100 0
@@ -2324,7 +2324,7 @@ t1a t1b t2a t2b
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b <=> t1.t1b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
-1 SIMPLE t2 ref idx idx 5 test.t1.t1b 2 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref idx idx 5 test.t1.t1b 2 Using where; Using join buffer (Batched Key Access)
SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b <=> t1.t1b;
t1a t1b t2a t2b
99 0 100 0
@@ -2341,7 +2341,7 @@ INSERT INTO t2 VALUES (100,0),(150,200),
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b = t1.t1b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
-1 SIMPLE t2 ref idx idx 4 test.t1.t1b 2 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref idx idx 4 test.t1.t1b 2 Using join buffer (Batched Key Access)
SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b = t1.t1b;
t1a t1b t2a t2b
99 0 100 0
@@ -2352,7 +2352,7 @@ t1a t1b t2a t2b
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b <=> t1.t1b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
-1 SIMPLE t2 ref idx idx 4 test.t1.t1b 2 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref idx idx 4 test.t1.t1b 2 Using where; Using join buffer (Batched Key Access)
SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b <=> t1.t1b;
t1a t1b t2a t2b
99 0 100 0
@@ -2413,7 +2413,7 @@ WHERE t3.c1 IN (SELECT t1.c2_key FROM t2
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 index NULL k1 5 NULL 2 Using where; Using index
2 DEPENDENT SUBQUERY t2 index PRIMARY PRIMARY 4 NULL 1 Using index
-2 DEPENDENT SUBQUERY t1 ref col_int_key col_int_key 4 func 1 Using where; Using join buffer (Batch Key Access)
+2 DEPENDENT SUBQUERY t1 ref col_int_key col_int_key 4 func 1 Using where; Using join buffer (Batched Key Access)
SELECT t3.c1 FROM t3
WHERE t3.c1 = SOME (SELECT t1.c2_key FROM t2 JOIN t1 ON t2.pk < t1.c1)
XOR TRUE;
@@ -2460,7 +2460,7 @@ GROUP BY field2
ORDER BY field1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL col_varchar_key 7 NULL 3 Using index; Using temporary; Using filesort
-1 SIMPLE t2 ref col_varchar_key col_varchar_key 3 test.t1.col_varchar_key 1 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref col_varchar_key col_varchar_key 3 test.t1.col_varchar_key 1 Using join buffer (Batched Key Access)
SELECT MIN(t2.col_datetime_key) AS field1,
t1.col_int_key AS field2
FROM t1
@@ -2518,7 +2518,7 @@ GROUP BY field1 , field4
ORDER BY t1.col_datetime_key ;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
-1 SIMPLE t1 ref col_int_key col_int_key 4 test.t2.pk 3 Using join buffer (Batch Key Access)
+1 SIMPLE t1 ref col_int_key col_int_key 4 test.t2.pk 3 Using join buffer (Batched Key Access)
SELECT t2.col_varchar_key AS field1 , COUNT(DISTINCT t1.col_varchar_nokey), t2.pk AS field4
FROM t1
RIGHT JOIN t2 ON t2.pk = t1.col_int_key
@@ -2583,7 +2583,7 @@ LIMIT 15;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found
1 SIMPLE alias2 ALL NULL NULL NULL NULL 16 Using temporary; Using filesort
-1 SIMPLE alias3 eq_ref PRIMARY PRIMARY 4 test.alias2.col_int_nokey 1 Using join buffer (Batch Key Access)
+1 SIMPLE alias3 eq_ref PRIMARY PRIMARY 4 test.alias2.col_int_nokey 1 Using join buffer (Batched Key Access)
SELECT t1.col_varchar_key AS field1, alias2.col_int_key AS field4
FROM t2 AS alias2 STRAIGHT_JOIN t2 AS alias3 ON alias3.pk =
alias2.col_int_nokey
@@ -2620,7 +2620,7 @@ id select_type table type possible_keys
1 SIMPLE t1 index NULL k 5 NULL 2 Using index
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.k 1 Using index
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (Block Nested Loop)
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t2.pk 1 Using join buffer (Batch Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t2.pk 1 Using join buffer (Batched Key Access)
SELECT t2.pk as t2_pk, t4.pk as t4_pk, t4.k as t4_k, t4.i
as t4_i FROM t1
LEFT JOIN t2 ON t1.k = t2.pk
@@ -2666,8 +2666,8 @@ WHERE t1.col_int OR t3.col_int;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using where; Using join buffer (Block Nested Loop)
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.pk 1 Using where; Using join buffer (Batch Key Access)
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t2.pk 1 Using join buffer (Batch Key Access)
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.pk 1 Using where; Using join buffer (Batched Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t2.pk 1 Using join buffer (Batched Key Access)
SELECT t4.col_int
FROM t1
LEFT JOIN t2 ON t1.col_int = t2.col_int
=== modified file 'mysql-test/r/join_cache_bka_nobnl.result'
--- a/mysql-test/r/join_cache_bka_nobnl.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/join_cache_bka_nobnl.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11;
DROP DATABASE IF EXISTS world;
set names utf8;
@@ -447,7 +447,7 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Using MRR
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (Batched Key Access)
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -476,8 +476,8 @@ City.Name LIKE 'L%' AND Country.Populati
CountryLanguage.Percentage > 50;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (Batch Key Access)
-1 SIMPLE City ref Country Country 3 world.Country.Code 18 Using index condition; Using where; Using join buffer (Batch Key Access)
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (Batched Key Access)
+1 SIMPLE City ref Country Country 3 world.Country.Code 18 Using index condition; Using where; Using join buffer (Batched Key Access)
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -659,7 +659,7 @@ WHERE
Country.Population > 10000000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country ALL NULL NULL NULL NULL 239 Using where
-1 SIMPLE CountryLanguage eq_ref PRIMARY PRIMARY 33 world.Country.Code,const 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE CountryLanguage eq_ref PRIMARY PRIMARY 33 world.Country.Code,const 1 Using where; Using join buffer (Batched Key Access)
SELECT Country.Name, IF(ISNULL(CountryLanguage.Country), NULL, CountryLanguage.Percentage)
FROM Country LEFT JOIN CountryLanguage ON
(CountryLanguage.Country=Country.Code AND Language='English')
@@ -754,7 +754,7 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Using MRR
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (Batched Key Access)
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -783,8 +783,8 @@ City.Name LIKE 'L%' AND Country.Populati
CountryLanguage.Percentage > 50;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (Batch Key Access)
-1 SIMPLE City ref Country Country 3 world.Country.Code 18 Using index condition; Using where; Using join buffer (Batch Key Access)
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (Batched Key Access)
+1 SIMPLE City ref Country Country 3 world.Country.Code 18 Using index condition; Using where; Using join buffer (Batched Key Access)
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -1017,7 +1017,7 @@ SELECT City.Name, Country.Name FROM City
WHERE City.Country=Country.Code AND City.Population > 3000000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Population,Country Population 4 NULL # Using index condition; Using MRR
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country # Using join buffer (Batch Key Access)
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country # Using join buffer (Batched Key Access)
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND City.Population > 3000000;
Name Name
@@ -1303,15 +1303,15 @@ t1.metaid = t2.metaid AND t1.affiliateid
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t6 system PRIMARY NULL NULL NULL 1
1 SIMPLE t1 ref t1_affiliateid,t1_metaid t1_affiliateid 4 const 1
-1 SIMPLE t4 ref PRIMARY,t4_formatclassid,t4_formats_idx t4_formats_idx 1 const 1 Using index condition; Using where; Using join buffer (Batch Key Access)
-1 SIMPLE t5 eq_ref PRIMARY,t5_formattypeid PRIMARY 4 test.t4.formatclassid 1 Using where; Using join buffer (Batch Key Access)
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.metaid 1 Using join buffer (Batch Key Access)
+1 SIMPLE t4 ref PRIMARY,t4_formatclassid,t4_formats_idx t4_formats_idx 1 const 1 Using index condition; Using where; Using join buffer (Batched Key Access)
+1 SIMPLE t5 eq_ref PRIMARY,t5_formattypeid PRIMARY 4 test.t4.formatclassid 1 Using where; Using join buffer (Batched Key Access)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.metaid 1 Using join buffer (Batched Key Access)
1 SIMPLE t7 ref PRIMARY PRIMARY 4 test.t1.metaid 1 Using index
-1 SIMPLE t8 eq_ref PRIMARY PRIMARY 4 test.t7.artistid 1 Using join buffer (Batch Key Access)
-1 SIMPLE t9 ref PRIMARY,t9_subgenreid,t9_metaid t9_metaid 4 test.t7.metaid 2 Using index condition; Using join buffer (Batch Key Access)
-1 SIMPLE t10 eq_ref PRIMARY,t10_genreid PRIMARY 4 test.t9.subgenreid 1 Using join buffer (Batch Key Access)
-1 SIMPLE t11 eq_ref PRIMARY PRIMARY 4 test.t10.genreid 1 Using join buffer (Batch Key Access)
-1 SIMPLE t3 ref t3_metaid,t3_formatid,t3_metaidformatid t3_metaid 4 test.t1.metaid 2 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t8 eq_ref PRIMARY PRIMARY 4 test.t7.artistid 1 Using join buffer (Batched Key Access)
+1 SIMPLE t9 ref PRIMARY,t9_subgenreid,t9_metaid t9_metaid 4 test.t7.metaid 2 Using index condition; Using join buffer (Batched Key Access)
+1 SIMPLE t10 eq_ref PRIMARY,t10_genreid PRIMARY 4 test.t9.subgenreid 1 Using join buffer (Batched Key Access)
+1 SIMPLE t11 eq_ref PRIMARY PRIMARY 4 test.t10.genreid 1 Using join buffer (Batched Key Access)
+1 SIMPLE t3 ref t3_metaid,t3_formatid,t3_metaidformatid t3_metaid 4 test.t1.metaid 2 Using where; Using join buffer (Batched Key Access)
SELECT t1.uniquekey, t1.xml AS affiliateXml,
t8.name AS artistName, t8.artistid,
t11.name AS genreName, t11.genreid, t11.priority AS genrePriority,
@@ -1363,7 +1363,7 @@ FROM t1,t2,t3 WHERE a1=a2 AND b2=b3 AND
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 9 Using where
1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a1 1 Using index
-1 SIMPLE t3 ref idx idx 5 test.t2.b2 5 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t3 ref idx idx 5 test.t2.b2 5 Using where; Using join buffer (Batched Key Access)
SELECT a1<>a2, a1, a2, b2, b3, c3,
SUBSTR(filler1,1,1) AS s1, SUBSTR(filler2,1,1) AS s2
FROM t1,t2,t3 WHERE a1=a2 AND b2=b3 AND MOD(c3,10)>7;
@@ -1390,7 +1390,7 @@ FROM t1,t2,t3 WHERE a1=a2 AND b2=b3 AND
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 9 Using where
1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a1 1 Using index
-1 SIMPLE t3 ref idx idx 5 test.t2.b2 5 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t3 ref idx idx 5 test.t2.b2 5 Using where; Using join buffer (Batched Key Access)
SELECT a1<>a2, a1, a2, b2, b3, c3,
SUBSTR(filler1,1,1) AS s1, SUBSTR(filler2,1,1) AS s2
FROM t1,t2,t3 WHERE a1=a2 AND b2=b3 AND MOD(c3,10)>7;
@@ -1421,7 +1421,7 @@ Warning 1292 Truncated incorrect join_bu
EXPLAIN SELECT * FROM t1,t2 WHERE t1.a=t2.a AND t1.b >= 30;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL idx NULL NULL NULL 7 Using where
-1 SIMPLE t2 ref idx idx 5 test.t1.a 2 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref idx idx 5 test.t1.a 2 Using join buffer (Batched Key Access)
SELECT * FROM t1,t2 WHERE t1.a=t2.a AND t1.b >= 30;
a b a b
7 40 7 10
@@ -1445,7 +1445,7 @@ select t1.a, count(t2.p) as count
from t1 left join t2 on t1.a=t2.a and t2.p % 2 = 1 group by t1.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL PRIMARY 4 NULL 8 Using index; Using temporary; Using filesort
-1 SIMPLE t2 ref i_a i_a 5 test.t1.a 2 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref i_a i_a 5 test.t1.a 2 Using where; Using join buffer (Batched Key Access)
select t1.a, count(t2.p) as count
from t1 left join t2 on t1.a=t2.a and t2.p % 2 = 1 group by t1.a;
a count
@@ -1470,7 +1470,7 @@ EXPLAIN
SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.a WHERE t2.b IS NULL;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
-1 SIMPLE t2 ref i_a i_a 4 test.t1.a 2 Using where; Not exists; Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref i_a i_a 4 test.t1.a 2 Using where; Not exists; Using join buffer (Batched Key Access)
SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.a WHERE t2.b IS NULL;
a a b
3 NULL NULL
@@ -1570,7 +1570,7 @@ set join_buffer_size=1024;
EXPLAIN SELECT AVG(c) FROM t1,t2 WHERE t1.a=t2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2050 Using where
-1 SIMPLE t2 ref idx idx 5 test.t1.a 640 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref idx idx 5 test.t1.a 640 Using join buffer (Batched Key Access)
SELECT AVG(c) FROM t1,t2 WHERE t1.a=t2.b;
AVG(c)
5.0000
@@ -1608,8 +1608,8 @@ WHERE t1.a=t2.a AND t2.a=t3.a AND
t1.b IS NULL AND t2.b IS NULL AND t3.b IS NULL;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16384 Using where
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where; Using join buffer (Batch Key Access)
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where; Using join buffer (Batched Key Access)
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where; Using join buffer (Batched Key Access)
SELECT COUNT(*) FROM t1,t2,t3
WHERE t1.a=t2.a AND t2.a=t3.a AND
t1.b IS NULL AND t2.b IS NULL AND t3.b IS NULL;
@@ -1671,7 +1671,7 @@ WHERE t1.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL 2 Using index
1 SIMPLE t2 ref PRIMARY PRIMARY 8 test.t1.a 1 Using index
-1 SIMPLE t3 ref idx idx 16 test.t1.a,test.t2.b 2 Using join buffer (Batch Key Access)
+1 SIMPLE t3 ref idx idx 16 test.t1.a,test.t2.b 2 Using join buffer (Batched Key Access)
SELECT t1.a, t2.a, t3.a, t2.b, t3.b, t3.val
FROM (t1,t2) LEFT JOIN t3 ON (t1.a=t3.a AND t2.b=t3.b)
WHERE t1.a=t2.a;
@@ -1739,7 +1739,7 @@ explain select t2.f1, t2.f2, t2.f3 from
where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
-1 SIMPLE t2 ref f1 f1 4 test.t1.f1 3 Using index condition; Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref f1 f1 4 test.t1.f1 3 Using index condition; Using join buffer (Batched Key Access)
drop table t1,t2;
#
# Bug #42955: join with GROUP BY/ORDER BY and when BKA is enabled
@@ -1756,7 +1756,7 @@ select t1.id1, sum(t2.id2) from t1 join
where t1.d=3 group by t1.id1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref idx1 idx1 5 const 4 Using where; Using index; Using temporary; Using filesort
-1 SIMPLE t2 ref idx2 idx2 5 test.t1.id1 2 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref idx2 idx2 5 test.t1.id1 2 Using join buffer (Batched Key Access)
select t1.id1, sum(t2.id2) from t1 join t2 on t1.id1=t2.id1
where t1.d=3 group by t1.id1;
id1 sum(t2.id2)
@@ -1768,7 +1768,7 @@ select t1.id1 from t1 join t2 on t1.id1
where t1.d=3 and t2.id2 > 200 order by t1.id1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref idx1 idx1 5 const 4 Using where; Using index; Using temporary; Using filesort
-1 SIMPLE t2 ref idx2 idx2 5 test.t1.id1 2 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref idx2 idx2 5 test.t1.id1 2 Using where; Using join buffer (Batched Key Access)
select t1.id1 from t1 join t2 on t1.id1=t2.id1
where t1.d=3 and t2.id2 > 200 order by t1.id1;
id1
@@ -1810,9 +1810,9 @@ select t1.a, t1.b, t1.c, t1.d, t2.e, t3.
where t2.b=t1.b and t3.d=t1.d and t4.c=t1.c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where
-1 SIMPLE t2 ref idx idx 5 test.t1.b 1 Using join buffer (Batch Key Access)
-1 SIMPLE t3 ref idx idx 5 test.t1.d 1 Using join buffer (Batch Key Access)
-1 SIMPLE t4 ref idx idx 5 test.t1.c 1 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref idx idx 5 test.t1.b 1 Using join buffer (Batched Key Access)
+1 SIMPLE t3 ref idx idx 5 test.t1.d 1 Using join buffer (Batched Key Access)
+1 SIMPLE t4 ref idx idx 5 test.t1.c 1 Using join buffer (Batched Key Access)
select t1.a, t1.b, t1.c, t1.d, t2.e, t3.f, t4.g from t1,t2,t3,t4
where t2.b=t1.b and t3.d=t1.d and t4.c=t1.c;
a b c d e f g
@@ -1859,10 +1859,10 @@ WHERE t1.id1=t5.id1 AND t1.id2=t5.id2 an
t5.enum2='Active' AND t3.id4=t2.id4 AND t2.id3=t1.id3 AND t3.text1<'D';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 349 Using where
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.id3 1 Using where; Using join buffer (Batch Key Access)
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.id4 1 Using where; Using join buffer (Batch Key Access)
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t1.id2 1 Using join buffer (Batch Key Access)
-1 SIMPLE t5 eq_ref PRIMARY PRIMARY 16 test.t1.id1,test.t1.id2 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.id3 1 Using where; Using join buffer (Batched Key Access)
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.id4 1 Using where; Using join buffer (Batched Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t1.id2 1 Using join buffer (Batched Key Access)
+1 SIMPLE t5 eq_ref PRIMARY PRIMARY 16 test.t1.id1,test.t1.id2 1 Using where; Using join buffer (Batched Key Access)
SELECT STRAIGHT_JOIN t1.id1, t1.num3, t3.text1, t3.id4, t2.id3, t4.dummy
FROM t1 JOIN t2 JOIN t3 JOIN t4 JOIN t5
WHERE t1.id1=t5.id1 AND t1.id2=t5.id2 and t4.id2=t1.id2 AND
@@ -2132,7 +2132,7 @@ INSERT INTO t2 VALUES (100,NULL),(150,20
EXPLAIN SELECT t2.a FROM t1 LEFT JOIN t2 FORCE INDEX (b) ON t2.b = t1.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
-1 SIMPLE t2 ref b b 5 test.t1.b 2 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref b b 5 test.t1.b 2 Using join buffer (Batched Key Access)
SELECT t2.a FROM t1 LEFT JOIN t2 FORCE INDEX (b) ON t2.b = t1.b;
a
NULL
@@ -2142,7 +2142,7 @@ INSERT INTO t1 VALUES (NULL),(NULL);
EXPLAIN SELECT t2.a FROM t1 LEFT JOIN t2 FORCE INDEX (b) ON t2.b = t1.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
-1 SIMPLE t2 ref b b 5 test.t1.b 2 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref b b 5 test.t1.b 2 Using join buffer (Batched Key Access)
SELECT t2.a FROM t1 LEFT JOIN t2 FORCE INDEX (b) ON t2.b = t1.b;
a
NULL
@@ -2155,7 +2155,7 @@ INSERT INTO t2 VALUES (100,NULL),(150,"v
explain SELECT t2.a FROM t1 LEFT JOIN t2 ON t2.b = t1.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
-1 SIMPLE t2 ref b b 103 test.t1.b 2 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref b b 103 test.t1.b 2 Using join buffer (Batched Key Access)
SELECT t2.a FROM t1 LEFT JOIN t2 ON t2.b = t1.b;
a
NULL
@@ -2180,7 +2180,7 @@ where table3 .`pk` and table3 .`col_int_
and table3 .`col_varchar_key` = table2 .`col_varchar_nokey`;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE table2 ALL NULL NULL NULL NULL 2 Using where
-1 SIMPLE table3 ref col_varchar_key col_varchar_key 4 test.table2.col_varchar_nokey 1 Using index condition; Using where; Using join buffer (Batch Key Access)
+1 SIMPLE table3 ref col_varchar_key col_varchar_key 4 test.table2.col_varchar_nokey 1 Using index condition; Using where; Using join buffer (Batched Key Access)
SELECT table2 .`col_int_key` FROM t1 table2,
t1 table3 force index (`col_varchar_key`)
where table3 .`pk` and table3 .`col_int_key` >= table2 .`pk`
@@ -2216,7 +2216,7 @@ ORDER BY t1.col_int_key, t1.col_datetime
LIMIT 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using temporary; Using filesort
-1 SIMPLE t2 ref col_int_key col_int_key 5 const 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref col_int_key col_int_key 5 const 1 Using where; Using join buffer (Batched Key Access)
SELECT t1.col_int_key, t1.col_datetime
FROM t1,t2
WHERE t2.col_int_key = 1 AND t2.col_int >= 3
@@ -2313,7 +2313,7 @@ INSERT INTO t2 VALUES (100,0),(150,200),
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b = t1.t1b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
-1 SIMPLE t2 ref idx idx 5 test.t1.t1b 2 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref idx idx 5 test.t1.t1b 2 Using join buffer (Batched Key Access)
SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b = t1.t1b;
t1a t1b t2a t2b
99 0 100 0
@@ -2324,7 +2324,7 @@ t1a t1b t2a t2b
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b <=> t1.t1b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
-1 SIMPLE t2 ref idx idx 5 test.t1.t1b 2 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref idx idx 5 test.t1.t1b 2 Using where; Using join buffer (Batched Key Access)
SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b <=> t1.t1b;
t1a t1b t2a t2b
99 0 100 0
@@ -2341,7 +2341,7 @@ INSERT INTO t2 VALUES (100,0),(150,200),
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b = t1.t1b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
-1 SIMPLE t2 ref idx idx 4 test.t1.t1b 2 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref idx idx 4 test.t1.t1b 2 Using join buffer (Batched Key Access)
SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b = t1.t1b;
t1a t1b t2a t2b
99 0 100 0
@@ -2352,7 +2352,7 @@ t1a t1b t2a t2b
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b <=> t1.t1b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
-1 SIMPLE t2 ref idx idx 4 test.t1.t1b 2 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref idx idx 4 test.t1.t1b 2 Using where; Using join buffer (Batched Key Access)
SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b <=> t1.t1b;
t1a t1b t2a t2b
99 0 100 0
@@ -2413,7 +2413,7 @@ WHERE t3.c1 IN (SELECT t1.c2_key FROM t2
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 index NULL k1 5 NULL 2 Using where; Using index
2 DEPENDENT SUBQUERY t2 index PRIMARY PRIMARY 4 NULL 1 Using index
-2 DEPENDENT SUBQUERY t1 ref col_int_key col_int_key 4 func 1 Using where; Using join buffer (Batch Key Access)
+2 DEPENDENT SUBQUERY t1 ref col_int_key col_int_key 4 func 1 Using where; Using join buffer (Batched Key Access)
SELECT t3.c1 FROM t3
WHERE t3.c1 = SOME (SELECT t1.c2_key FROM t2 JOIN t1 ON t2.pk < t1.c1)
XOR TRUE;
@@ -2460,7 +2460,7 @@ GROUP BY field2
ORDER BY field1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL col_varchar_key 7 NULL 3 Using index; Using temporary; Using filesort
-1 SIMPLE t2 ref col_varchar_key col_varchar_key 3 test.t1.col_varchar_key 1 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref col_varchar_key col_varchar_key 3 test.t1.col_varchar_key 1 Using join buffer (Batched Key Access)
SELECT MIN(t2.col_datetime_key) AS field1,
t1.col_int_key AS field2
FROM t1
@@ -2518,7 +2518,7 @@ GROUP BY field1 , field4
ORDER BY t1.col_datetime_key ;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
-1 SIMPLE t1 ref col_int_key col_int_key 4 test.t2.pk 3 Using join buffer (Batch Key Access)
+1 SIMPLE t1 ref col_int_key col_int_key 4 test.t2.pk 3 Using join buffer (Batched Key Access)
SELECT t2.col_varchar_key AS field1 , COUNT(DISTINCT t1.col_varchar_nokey), t2.pk AS field4
FROM t1
RIGHT JOIN t2 ON t2.pk = t1.col_int_key
@@ -2583,7 +2583,7 @@ LIMIT 15;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found
1 SIMPLE alias2 ALL NULL NULL NULL NULL 16 Using temporary; Using filesort
-1 SIMPLE alias3 eq_ref PRIMARY PRIMARY 4 test.alias2.col_int_nokey 1 Using join buffer (Batch Key Access)
+1 SIMPLE alias3 eq_ref PRIMARY PRIMARY 4 test.alias2.col_int_nokey 1 Using join buffer (Batched Key Access)
SELECT t1.col_varchar_key AS field1, alias2.col_int_key AS field4
FROM t2 AS alias2 STRAIGHT_JOIN t2 AS alias3 ON alias3.pk =
alias2.col_int_nokey
@@ -2620,7 +2620,7 @@ id select_type table type possible_keys
1 SIMPLE t1 index NULL k 5 NULL 2 Using index
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.k 1 Using index
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 Using where
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t2.pk 1 Using join buffer (Batch Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t2.pk 1 Using join buffer (Batched Key Access)
SELECT t2.pk as t2_pk, t4.pk as t4_pk, t4.k as t4_k, t4.i
as t4_i FROM t1
LEFT JOIN t2 ON t1.k = t2.pk
@@ -2666,8 +2666,8 @@ WHERE t1.col_int OR t3.col_int;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using where
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.pk 1 Using where; Using join buffer (Batch Key Access)
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t2.pk 1 Using join buffer (Batch Key Access)
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.pk 1 Using where; Using join buffer (Batched Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t2.pk 1 Using join buffer (Batched Key Access)
SELECT t4.col_int
FROM t1
LEFT JOIN t2 ON t1.col_int = t2.col_int
=== modified file 'mysql-test/r/join_cache_bkaunique.result'
--- a/mysql-test/r/join_cache_bkaunique.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/join_cache_bkaunique.result 2011-09-07 10:21:50 +0000
@@ -1,5 +1,5 @@
SET debug= '+d,test_bka_unique';
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11;
DROP DATABASE IF EXISTS world;
set names utf8;
@@ -448,7 +448,7 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Using MRR
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (Batch Key Access (unique))
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (Batched Key Access (unique))
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -477,8 +477,8 @@ City.Name LIKE 'L%' AND Country.Populati
CountryLanguage.Percentage > 50;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (Batch Key Access (unique))
-1 SIMPLE City ref Country Country 3 world.Country.Code 18 Using index condition; Using where; Using join buffer (Batch Key Access (unique))
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (Batched Key Access (unique))
+1 SIMPLE City ref Country Country 3 world.Country.Code 18 Using index condition; Using where; Using join buffer (Batched Key Access (unique))
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -660,7 +660,7 @@ WHERE
Country.Population > 10000000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country ALL NULL NULL NULL NULL 239 Using where
-1 SIMPLE CountryLanguage eq_ref PRIMARY PRIMARY 33 world.Country.Code,const 1 Using where; Using join buffer (Batch Key Access (unique))
+1 SIMPLE CountryLanguage eq_ref PRIMARY PRIMARY 33 world.Country.Code,const 1 Using where; Using join buffer (Batched Key Access (unique))
SELECT Country.Name, IF(ISNULL(CountryLanguage.Country), NULL, CountryLanguage.Percentage)
FROM Country LEFT JOIN CountryLanguage ON
(CountryLanguage.Country=Country.Code AND Language='English')
@@ -755,7 +755,7 @@ WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Country range PRIMARY,Name Name 52 NULL 10 Using index condition; Using MRR
-1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (Batch Key Access (unique))
+1 SIMPLE City ref Population,Country Country 3 world.Country.Code 18 Using where; Using join buffer (Batched Key Access (unique))
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND
Country.Name LIKE 'L%' AND City.Population > 100000;
@@ -784,8 +784,8 @@ City.Name LIKE 'L%' AND Country.Populati
CountryLanguage.Percentage > 50;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE CountryLanguage ALL PRIMARY,Percentage NULL NULL NULL 984 Using where
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (Batch Key Access (unique))
-1 SIMPLE City ref Country Country 3 world.Country.Code 18 Using index condition; Using where; Using join buffer (Batch Key Access (unique))
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.CountryLanguage.Country 1 Using where; Using join buffer (Batched Key Access (unique))
+1 SIMPLE City ref Country Country 3 world.Country.Code 18 Using index condition; Using where; Using join buffer (Batched Key Access (unique))
SELECT City.Name, Country.Name, CountryLanguage.Language
FROM City,Country,CountryLanguage
WHERE City.Country=Country.Code AND
@@ -1018,7 +1018,7 @@ SELECT City.Name, Country.Name FROM City
WHERE City.Country=Country.Code AND City.Population > 3000000;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Population,Country Population 4 NULL # Using index condition; Using MRR
-1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country # Using join buffer (Batch Key Access (unique))
+1 SIMPLE Country eq_ref PRIMARY PRIMARY 3 world.City.Country # Using join buffer (Batched Key Access (unique))
SELECT City.Name, Country.Name FROM City,Country
WHERE City.Country=Country.Code AND City.Population > 3000000;
Name Name
@@ -1304,14 +1304,14 @@ t1.metaid = t2.metaid AND t1.affiliateid
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t6 system PRIMARY NULL NULL NULL 1
1 SIMPLE t1 ref t1_affiliateid,t1_metaid t1_affiliateid 4 const 1
-1 SIMPLE t4 ref PRIMARY,t4_formatclassid,t4_formats_idx t4_formats_idx 1 const 1 Using index condition; Using where; Using join buffer (Batch Key Access (unique))
-1 SIMPLE t5 eq_ref PRIMARY,t5_formattypeid PRIMARY 4 test.t4.formatclassid 1 Using where; Using join buffer (Batch Key Access (unique))
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.metaid 1 Using join buffer (Batch Key Access (unique))
+1 SIMPLE t4 ref PRIMARY,t4_formatclassid,t4_formats_idx t4_formats_idx 1 const 1 Using index condition; Using where; Using join buffer (Batched Key Access (unique))
+1 SIMPLE t5 eq_ref PRIMARY,t5_formattypeid PRIMARY 4 test.t4.formatclassid 1 Using where; Using join buffer (Batched Key Access (unique))
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.metaid 1 Using join buffer (Batched Key Access (unique))
1 SIMPLE t7 ref PRIMARY PRIMARY 4 test.t1.metaid 1 Using index
-1 SIMPLE t8 eq_ref PRIMARY PRIMARY 4 test.t7.artistid 1 Using join buffer (Batch Key Access (unique))
-1 SIMPLE t9 ref PRIMARY,t9_subgenreid,t9_metaid t9_metaid 4 test.t7.metaid 2 Using index condition; Using join buffer (Batch Key Access (unique))
-1 SIMPLE t10 eq_ref PRIMARY,t10_genreid PRIMARY 4 test.t9.subgenreid 1 Using join buffer (Batch Key Access (unique))
-1 SIMPLE t11 eq_ref PRIMARY PRIMARY 4 test.t10.genreid 1 Using join buffer (Batch Key Access (unique))
+1 SIMPLE t8 eq_ref PRIMARY PRIMARY 4 test.t7.artistid 1 Using join buffer (Batched Key Access (unique))
+1 SIMPLE t9 ref PRIMARY,t9_subgenreid,t9_metaid t9_metaid 4 test.t7.metaid 2 Using index condition; Using join buffer (Batched Key Access (unique))
+1 SIMPLE t10 eq_ref PRIMARY,t10_genreid PRIMARY 4 test.t9.subgenreid 1 Using join buffer (Batched Key Access (unique))
+1 SIMPLE t11 eq_ref PRIMARY PRIMARY 4 test.t10.genreid 1 Using join buffer (Batched Key Access (unique))
1 SIMPLE t3 ALL t3_metaid,t3_formatid,t3_metaidformatid NULL NULL NULL 2 Using where; Using join buffer (Block Nested Loop)
SELECT t1.uniquekey, t1.xml AS affiliateXml,
t8.name AS artistName, t8.artistid,
@@ -1364,7 +1364,7 @@ FROM t1,t2,t3 WHERE a1=a2 AND b2=b3 AND
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 9 Using where
1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a1 1 Using index
-1 SIMPLE t3 ref idx idx 5 test.t2.b2 5 Using where; Using join buffer (Batch Key Access (unique))
+1 SIMPLE t3 ref idx idx 5 test.t2.b2 5 Using where; Using join buffer (Batched Key Access (unique))
SELECT a1<>a2, a1, a2, b2, b3, c3,
SUBSTR(filler1,1,1) AS s1, SUBSTR(filler2,1,1) AS s2
FROM t1,t2,t3 WHERE a1=a2 AND b2=b3 AND MOD(c3,10)>7;
@@ -1391,7 +1391,7 @@ FROM t1,t2,t3 WHERE a1=a2 AND b2=b3 AND
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 9 Using where
1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a1 1 Using index
-1 SIMPLE t3 ref idx idx 5 test.t2.b2 5 Using where; Using join buffer (Batch Key Access (unique))
+1 SIMPLE t3 ref idx idx 5 test.t2.b2 5 Using where; Using join buffer (Batched Key Access (unique))
SELECT a1<>a2, a1, a2, b2, b3, c3,
SUBSTR(filler1,1,1) AS s1, SUBSTR(filler2,1,1) AS s2
FROM t1,t2,t3 WHERE a1=a2 AND b2=b3 AND MOD(c3,10)>7;
@@ -1422,7 +1422,7 @@ Warning 1292 Truncated incorrect join_bu
EXPLAIN SELECT * FROM t1,t2 WHERE t1.a=t2.a AND t1.b >= 30;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL idx NULL NULL NULL 7 Using where
-1 SIMPLE t2 ref idx idx 5 test.t1.a 2 Using join buffer (Batch Key Access (unique))
+1 SIMPLE t2 ref idx idx 5 test.t1.a 2 Using join buffer (Batched Key Access (unique))
SELECT * FROM t1,t2 WHERE t1.a=t2.a AND t1.b >= 30;
a b a b
7 40 7 10
@@ -1571,7 +1571,7 @@ set join_buffer_size=1024;
EXPLAIN SELECT AVG(c) FROM t1,t2 WHERE t1.a=t2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2050 Using where
-1 SIMPLE t2 ref idx idx 5 test.t1.a 640 Using join buffer (Batch Key Access (unique))
+1 SIMPLE t2 ref idx idx 5 test.t1.a 640 Using join buffer (Batched Key Access (unique))
SELECT AVG(c) FROM t1,t2 WHERE t1.a=t2.b;
AVG(c)
5.0000
@@ -1609,8 +1609,8 @@ WHERE t1.a=t2.a AND t2.a=t3.a AND
t1.b IS NULL AND t2.b IS NULL AND t3.b IS NULL;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16384 Using where
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where; Using join buffer (Batch Key Access (unique))
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where; Using join buffer (Batch Key Access (unique))
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where; Using join buffer (Batched Key Access (unique))
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where; Using join buffer (Batched Key Access (unique))
SELECT COUNT(*) FROM t1,t2,t3
WHERE t1.a=t2.a AND t2.a=t3.a AND
t1.b IS NULL AND t2.b IS NULL AND t3.b IS NULL;
@@ -1672,7 +1672,7 @@ WHERE t1.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index PRIMARY PRIMARY 8 NULL 2 Using index
1 SIMPLE t2 ref PRIMARY PRIMARY 8 test.t1.a 1 Using index
-1 SIMPLE t3 ref idx idx 16 test.t1.a,test.t2.b 2 Using join buffer (Batch Key Access (unique))
+1 SIMPLE t3 ref idx idx 16 test.t1.a,test.t2.b 2 Using join buffer (Batched Key Access (unique))
SELECT t1.a, t2.a, t3.a, t2.b, t3.b, t3.val
FROM (t1,t2) LEFT JOIN t3 ON (t1.a=t3.a AND t2.b=t3.b)
WHERE t1.a=t2.a;
@@ -1740,7 +1740,7 @@ explain select t2.f1, t2.f2, t2.f3 from
where t1.f1=t2.f1 and t2.f2 between t1.f1 and t2.f2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where
-1 SIMPLE t2 ref f1 f1 4 test.t1.f1 3 Using index condition; Using join buffer (Batch Key Access (unique))
+1 SIMPLE t2 ref f1 f1 4 test.t1.f1 3 Using index condition; Using join buffer (Batched Key Access (unique))
drop table t1,t2;
#
# Bug #42955: join with GROUP BY/ORDER BY and when BKA is enabled
@@ -1757,7 +1757,7 @@ select t1.id1, sum(t2.id2) from t1 join
where t1.d=3 group by t1.id1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref idx1 idx1 5 const 4 Using where; Using index; Using temporary; Using filesort
-1 SIMPLE t2 ref idx2 idx2 5 test.t1.id1 2 Using join buffer (Batch Key Access (unique))
+1 SIMPLE t2 ref idx2 idx2 5 test.t1.id1 2 Using join buffer (Batched Key Access (unique))
select t1.id1, sum(t2.id2) from t1 join t2 on t1.id1=t2.id1
where t1.d=3 group by t1.id1;
id1 sum(t2.id2)
@@ -1769,7 +1769,7 @@ select t1.id1 from t1 join t2 on t1.id1
where t1.d=3 and t2.id2 > 200 order by t1.id1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref idx1 idx1 5 const 4 Using where; Using index; Using temporary; Using filesort
-1 SIMPLE t2 ref idx2 idx2 5 test.t1.id1 2 Using where; Using join buffer (Batch Key Access (unique))
+1 SIMPLE t2 ref idx2 idx2 5 test.t1.id1 2 Using where; Using join buffer (Batched Key Access (unique))
select t1.id1 from t1 join t2 on t1.id1=t2.id1
where t1.d=3 and t2.id2 > 200 order by t1.id1;
id1
@@ -1811,9 +1811,9 @@ select t1.a, t1.b, t1.c, t1.d, t2.e, t3.
where t2.b=t1.b and t3.d=t1.d and t4.c=t1.c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where
-1 SIMPLE t2 ref idx idx 5 test.t1.b 1 Using join buffer (Batch Key Access (unique))
-1 SIMPLE t3 ref idx idx 5 test.t1.d 1 Using join buffer (Batch Key Access (unique))
-1 SIMPLE t4 ref idx idx 5 test.t1.c 1 Using join buffer (Batch Key Access (unique))
+1 SIMPLE t2 ref idx idx 5 test.t1.b 1 Using join buffer (Batched Key Access (unique))
+1 SIMPLE t3 ref idx idx 5 test.t1.d 1 Using join buffer (Batched Key Access (unique))
+1 SIMPLE t4 ref idx idx 5 test.t1.c 1 Using join buffer (Batched Key Access (unique))
select t1.a, t1.b, t1.c, t1.d, t2.e, t3.f, t4.g from t1,t2,t3,t4
where t2.b=t1.b and t3.d=t1.d and t4.c=t1.c;
a b c d e f g
@@ -1860,10 +1860,10 @@ WHERE t1.id1=t5.id1 AND t1.id2=t5.id2 an
t5.enum2='Active' AND t3.id4=t2.id4 AND t2.id3=t1.id3 AND t3.text1<'D';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 349 Using where
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.id3 1 Using where; Using join buffer (Batch Key Access (unique))
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.id4 1 Using where; Using join buffer (Batch Key Access (unique))
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t1.id2 1 Using join buffer (Batch Key Access (unique))
-1 SIMPLE t5 eq_ref PRIMARY PRIMARY 16 test.t1.id1,test.t1.id2 1 Using where; Using join buffer (Batch Key Access (unique))
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.id3 1 Using where; Using join buffer (Batched Key Access (unique))
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.id4 1 Using where; Using join buffer (Batched Key Access (unique))
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t1.id2 1 Using join buffer (Batched Key Access (unique))
+1 SIMPLE t5 eq_ref PRIMARY PRIMARY 16 test.t1.id1,test.t1.id2 1 Using where; Using join buffer (Batched Key Access (unique))
SELECT STRAIGHT_JOIN t1.id1, t1.num3, t3.text1, t3.id4, t2.id3, t4.dummy
FROM t1 JOIN t2 JOIN t3 JOIN t4 JOIN t5
WHERE t1.id1=t5.id1 AND t1.id2=t5.id2 and t4.id2=t1.id2 AND
@@ -2133,7 +2133,7 @@ INSERT INTO t2 VALUES (100,NULL),(150,20
EXPLAIN SELECT t2.a FROM t1 LEFT JOIN t2 FORCE INDEX (b) ON t2.b = t1.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
-1 SIMPLE t2 ref b b 5 test.t1.b 2 Using join buffer (Batch Key Access (unique))
+1 SIMPLE t2 ref b b 5 test.t1.b 2 Using join buffer (Batched Key Access (unique))
SELECT t2.a FROM t1 LEFT JOIN t2 FORCE INDEX (b) ON t2.b = t1.b;
a
NULL
@@ -2143,7 +2143,7 @@ INSERT INTO t1 VALUES (NULL),(NULL);
EXPLAIN SELECT t2.a FROM t1 LEFT JOIN t2 FORCE INDEX (b) ON t2.b = t1.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2
-1 SIMPLE t2 ref b b 5 test.t1.b 2 Using join buffer (Batch Key Access (unique))
+1 SIMPLE t2 ref b b 5 test.t1.b 2 Using join buffer (Batched Key Access (unique))
SELECT t2.a FROM t1 LEFT JOIN t2 FORCE INDEX (b) ON t2.b = t1.b;
a
NULL
@@ -2181,7 +2181,7 @@ where table3 .`pk` and table3 .`col_int_
and table3 .`col_varchar_key` = table2 .`col_varchar_nokey`;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE table2 ALL NULL NULL NULL NULL 2 Using where
-1 SIMPLE table3 ref col_varchar_key col_varchar_key 4 test.table2.col_varchar_nokey 1 Using index condition; Using where; Using join buffer (Batch Key Access (unique))
+1 SIMPLE table3 ref col_varchar_key col_varchar_key 4 test.table2.col_varchar_nokey 1 Using index condition; Using where; Using join buffer (Batched Key Access (unique))
SELECT table2 .`col_int_key` FROM t1 table2,
t1 table3 force index (`col_varchar_key`)
where table3 .`pk` and table3 .`col_int_key` >= table2 .`pk`
@@ -2217,7 +2217,7 @@ ORDER BY t1.col_int_key, t1.col_datetime
LIMIT 2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using temporary; Using filesort
-1 SIMPLE t2 ref col_int_key col_int_key 5 const 1 Using where; Using join buffer (Batch Key Access (unique))
+1 SIMPLE t2 ref col_int_key col_int_key 5 const 1 Using where; Using join buffer (Batched Key Access (unique))
SELECT t1.col_int_key, t1.col_datetime
FROM t1,t2
WHERE t2.col_int_key = 1 AND t2.col_int >= 3
@@ -2314,7 +2314,7 @@ INSERT INTO t2 VALUES (100,0),(150,200),
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b = t1.t1b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
-1 SIMPLE t2 ref idx idx 5 test.t1.t1b 2 Using join buffer (Batch Key Access (unique))
+1 SIMPLE t2 ref idx idx 5 test.t1.t1b 2 Using join buffer (Batched Key Access (unique))
SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b = t1.t1b;
t1a t1b t2a t2b
99 0 100 0
@@ -2325,7 +2325,7 @@ t1a t1b t2a t2b
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b <=> t1.t1b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
-1 SIMPLE t2 ref idx idx 5 test.t1.t1b 2 Using where; Using join buffer (Batch Key Access (unique))
+1 SIMPLE t2 ref idx idx 5 test.t1.t1b 2 Using where; Using join buffer (Batched Key Access (unique))
SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b <=> t1.t1b;
t1a t1b t2a t2b
99 0 100 0
@@ -2342,7 +2342,7 @@ INSERT INTO t2 VALUES (100,0),(150,200),
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b = t1.t1b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
-1 SIMPLE t2 ref idx idx 4 test.t1.t1b 2 Using join buffer (Batch Key Access (unique))
+1 SIMPLE t2 ref idx idx 4 test.t1.t1b 2 Using join buffer (Batched Key Access (unique))
SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b = t1.t1b;
t1a t1b t2a t2b
99 0 100 0
@@ -2353,7 +2353,7 @@ t1a t1b t2a t2b
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b <=> t1.t1b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3
-1 SIMPLE t2 ref idx idx 4 test.t1.t1b 2 Using where; Using join buffer (Batch Key Access (unique))
+1 SIMPLE t2 ref idx idx 4 test.t1.t1b 2 Using where; Using join buffer (Batched Key Access (unique))
SELECT * FROM t1 LEFT JOIN t2 force index (idx) ON t2.t2b <=> t1.t1b;
t1a t1b t2a t2b
99 0 100 0
@@ -2414,7 +2414,7 @@ WHERE t3.c1 IN (SELECT t1.c2_key FROM t2
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 index NULL k1 5 NULL 2 Using where; Using index
2 DEPENDENT SUBQUERY t2 index PRIMARY PRIMARY 4 NULL 1 Using index
-2 DEPENDENT SUBQUERY t1 ref col_int_key col_int_key 4 func 1 Using where; Using join buffer (Batch Key Access (unique))
+2 DEPENDENT SUBQUERY t1 ref col_int_key col_int_key 4 func 1 Using where; Using join buffer (Batched Key Access (unique))
SELECT t3.c1 FROM t3
WHERE t3.c1 = SOME (SELECT t1.c2_key FROM t2 JOIN t1 ON t2.pk < t1.c1)
XOR TRUE;
@@ -2461,7 +2461,7 @@ GROUP BY field2
ORDER BY field1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index NULL col_varchar_key 7 NULL 3 Using index; Using temporary; Using filesort
-1 SIMPLE t2 ref col_varchar_key col_varchar_key 3 test.t1.col_varchar_key 1 Using join buffer (Batch Key Access (unique))
+1 SIMPLE t2 ref col_varchar_key col_varchar_key 3 test.t1.col_varchar_key 1 Using join buffer (Batched Key Access (unique))
SELECT MIN(t2.col_datetime_key) AS field1,
t1.col_int_key AS field2
FROM t1
@@ -2519,7 +2519,7 @@ GROUP BY field1 , field4
ORDER BY t1.col_datetime_key ;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
-1 SIMPLE t1 ref col_int_key col_int_key 4 test.t2.pk 3 Using join buffer (Batch Key Access (unique))
+1 SIMPLE t1 ref col_int_key col_int_key 4 test.t2.pk 3 Using join buffer (Batched Key Access (unique))
SELECT t2.col_varchar_key AS field1 , COUNT(DISTINCT t1.col_varchar_nokey), t2.pk AS field4
FROM t1
RIGHT JOIN t2 ON t2.pk = t1.col_int_key
@@ -2584,7 +2584,7 @@ LIMIT 15;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 0 const row not found
1 SIMPLE alias2 ALL NULL NULL NULL NULL 16 Using temporary; Using filesort
-1 SIMPLE alias3 eq_ref PRIMARY PRIMARY 4 test.alias2.col_int_nokey 1 Using join buffer (Batch Key Access (unique))
+1 SIMPLE alias3 eq_ref PRIMARY PRIMARY 4 test.alias2.col_int_nokey 1 Using join buffer (Batched Key Access (unique))
SELECT t1.col_varchar_key AS field1, alias2.col_int_key AS field4
FROM t2 AS alias2 STRAIGHT_JOIN t2 AS alias3 ON alias3.pk =
alias2.col_int_nokey
@@ -2621,7 +2621,7 @@ id select_type table type possible_keys
1 SIMPLE t1 index NULL k 5 NULL 2 Using index
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.k 1 Using index
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (Block Nested Loop)
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t2.pk 1 Using join buffer (Batch Key Access (unique))
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t2.pk 1 Using join buffer (Batched Key Access (unique))
SELECT t2.pk as t2_pk, t4.pk as t4_pk, t4.k as t4_k, t4.i
as t4_i FROM t1
LEFT JOIN t2 ON t1.k = t2.pk
@@ -2667,8 +2667,8 @@ WHERE t1.col_int OR t3.col_int;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using where; Using join buffer (Block Nested Loop)
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.pk 1 Using where; Using join buffer (Batch Key Access (unique))
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t2.pk 1 Using join buffer (Batch Key Access (unique))
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.pk 1 Using where; Using join buffer (Batched Key Access (unique))
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t2.pk 1 Using join buffer (Batched Key Access (unique))
SELECT t4.col_int
FROM t1
LEFT JOIN t2 ON t1.col_int = t2.col_int
=== modified file 'mysql-test/r/join_cache_nojb.result'
--- a/mysql-test/r/join_cache_nojb.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/join_cache_nojb.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='block_nested_loop=off,batch_key_access=off';
+set optimizer_switch='block_nested_loop=off,batched_key_access=off';
set optimizer_switch='mrr_cost_based=off';
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11;
DROP DATABASE IF EXISTS world;
=== modified file 'mysql-test/r/join_nested_bka.result'
--- a/mysql-test/r/join_nested_bka.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/join_nested_bka.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
DROP TABLE IF EXISTS t0,t1,t2,t3,t4,t5,t6,t7,t8,t9;
CREATE TABLE t0 (a int, b int, c int);
CREATE TABLE t1 (a int, b int, c int);
@@ -1056,7 +1056,7 @@ t0.b=t1.b AND
(t9.a=1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t0 ref idx_a idx_a 5 const 1 100.00 Using where
-1 SIMPLE t1 ref idx_b idx_b 5 test.t0.b 2 100.00 Using join buffer (Batch Key Access)
+1 SIMPLE t1 ref idx_b idx_b 5 test.t0.b 2 100.00 Using join buffer (Batched Key Access)
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (Block Nested Loop)
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (Block Nested Loop)
1 SIMPLE t4 ALL idx_b NULL NULL NULL 2 100.00 Using where; Using join buffer (Block Nested Loop)
@@ -1446,27 +1446,27 @@ explain select * from t4 join
t2 left join (t3 join t5 on t5.a=t3.b) on t3.a=t2.b where t4.a<=>t3.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL X
-1 SIMPLE t3 ref a a 5 test.t2.b X Using join buffer (Batch Key Access)
-1 SIMPLE t5 ref a a 5 test.t3.b X Using join buffer (Batch Key Access)
-1 SIMPLE t4 ref a a 5 test.t3.b X Using index condition; Using join buffer (Batch Key Access)
+1 SIMPLE t3 ref a a 5 test.t2.b X Using join buffer (Batched Key Access)
+1 SIMPLE t5 ref a a 5 test.t3.b X Using join buffer (Batched Key Access)
+1 SIMPLE t4 ref a a 5 test.t3.b X Using index condition; Using join buffer (Batched Key Access)
explain select * from (t4 join t6 on t6.a=t4.b) right join t3 on t4.a=t3.b
join t2 left join (t5 join t7 on t7.a=t5.b) on t5.a=t2.b where t3.a<=>t2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL X
-1 SIMPLE t3 ref a a 5 test.t2.b X Using index condition; Using join buffer (Batch Key Access)
-1 SIMPLE t4 ref a a 5 test.t3.b X Using join buffer (Batch Key Access)
-1 SIMPLE t6 ref a a 5 test.t4.b X Using join buffer (Batch Key Access)
-1 SIMPLE t5 ref a a 5 test.t2.b X Using join buffer (Batch Key Access)
-1 SIMPLE t7 ref a a 5 test.t5.b X Using join buffer (Batch Key Access)
+1 SIMPLE t3 ref a a 5 test.t2.b X Using index condition; Using join buffer (Batched Key Access)
+1 SIMPLE t4 ref a a 5 test.t3.b X Using join buffer (Batched Key Access)
+1 SIMPLE t6 ref a a 5 test.t4.b X Using join buffer (Batched Key Access)
+1 SIMPLE t5 ref a a 5 test.t2.b X Using join buffer (Batched Key Access)
+1 SIMPLE t7 ref a a 5 test.t5.b X Using join buffer (Batched Key Access)
explain select * from t2 left join
(t3 left join (t4 join t6 on t6.a=t4.b) on t4.a=t3.b
join t5 on t5.a=t3.b) on t3.a=t2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL X
-1 SIMPLE t3 ref a a 5 test.t2.b X Using join buffer (Batch Key Access)
-1 SIMPLE t4 ref a a 5 test.t3.b X Using join buffer (Batch Key Access)
-1 SIMPLE t6 ref a a 5 test.t4.b X Using join buffer (Batch Key Access)
-1 SIMPLE t5 ref a a 5 test.t3.b X Using join buffer (Batch Key Access)
+1 SIMPLE t3 ref a a 5 test.t2.b X Using join buffer (Batched Key Access)
+1 SIMPLE t4 ref a a 5 test.t3.b X Using join buffer (Batched Key Access)
+1 SIMPLE t6 ref a a 5 test.t4.b X Using join buffer (Batched Key Access)
+1 SIMPLE t5 ref a a 5 test.t3.b X Using join buffer (Batched Key Access)
drop table t0, t1, t2, t3, t4, t5, t6, t7;
create table t1 (a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
@@ -1479,8 +1479,8 @@ explain select * from t1 left join
on (t1.a = t2.a);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10
-1 SIMPLE t2 ref a a 5 test.t1.a 1 Using join buffer (Batch Key Access)
-1 SIMPLE t3 ref a a 5 test.t2.a 1 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref a a 5 test.t1.a 1 Using join buffer (Batched Key Access)
+1 SIMPLE t3 ref a a 5 test.t2.a 1 Using join buffer (Batched Key Access)
drop table t1, t2, t3;
CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, type varchar(10));
CREATE TABLE t2 (pid int NOT NULL PRIMARY KEY, type varchar(10));
@@ -1803,7 +1803,7 @@ ON (t5.b=t8.b);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t5 ALL NULL NULL NULL NULL 2
1 SIMPLE t6 ALL NULL NULL NULL NULL 1 Using join buffer (Block Nested Loop)
-1 SIMPLE t7 const PRIMARY PRIMARY 4 const 1 Using join buffer (Batch Key Access)
+1 SIMPLE t7 const PRIMARY PRIMARY 4 const 1 Using join buffer (Batched Key Access)
1 SIMPLE t8 ALL b_i NULL NULL NULL 1 Using where; Using join buffer (Block Nested Loop)
SELECT t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b
FROM t5 LEFT JOIN
@@ -1820,8 +1820,8 @@ ON (t5.b=t8.b);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t5 ALL NULL NULL NULL NULL 2
1 SIMPLE t6 ALL NULL NULL NULL NULL 1 Using join buffer (Block Nested Loop)
-1 SIMPLE t7 ref b_i b_i 5 const 0 Using join buffer (Batch Key Access)
-1 SIMPLE t8 ref b_i b_i 5 test.t5.b 2 Using join buffer (Batch Key Access)
+1 SIMPLE t7 ref b_i b_i 5 const 0 Using join buffer (Batched Key Access)
+1 SIMPLE t8 ref b_i b_i 5 test.t5.b 2 Using join buffer (Batched Key Access)
SELECT t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b
FROM t5 LEFT JOIN
(t6 LEFT JOIN t7 ON t7.b=2, t8)
@@ -1838,7 +1838,7 @@ id select_type table type possible_keys
1 SIMPLE t5 ALL NULL NULL NULL NULL 2
1 SIMPLE t8 ALL b_i NULL NULL NULL 1 Using where; Using join buffer (Block Nested Loop)
1 SIMPLE t6 ALL NULL NULL NULL NULL 1 Using join buffer (Block Nested Loop)
-1 SIMPLE t7 const PRIMARY PRIMARY 4 const 1 Using join buffer (Batch Key Access)
+1 SIMPLE t7 const PRIMARY PRIMARY 4 const 1 Using join buffer (Batched Key Access)
SELECT t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b
FROM t5 LEFT JOIN
(t8, t6 LEFT JOIN t7 ON t7.a=1)
=== modified file 'mysql-test/r/join_nested_bka_nobnl.result'
--- a/mysql-test/r/join_nested_bka_nobnl.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/join_nested_bka_nobnl.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
DROP TABLE IF EXISTS t0,t1,t2,t3,t4,t5,t6,t7,t8,t9;
CREATE TABLE t0 (a int, b int, c int);
CREATE TABLE t1 (a int, b int, c int);
@@ -1056,7 +1056,7 @@ t0.b=t1.b AND
(t9.a=1);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE t0 ref idx_a idx_a 5 const 1 100.00 Using where
-1 SIMPLE t1 ref idx_b idx_b 5 test.t0.b 2 100.00 Using join buffer (Batch Key Access)
+1 SIMPLE t1 ref idx_b idx_b 5 test.t0.b 2 100.00 Using join buffer (Batched Key Access)
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 2 100.00 Using where
@@ -1446,27 +1446,27 @@ explain select * from t4 join
t2 left join (t3 join t5 on t5.a=t3.b) on t3.a=t2.b where t4.a<=>t3.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL X
-1 SIMPLE t3 ref a a 5 test.t2.b X Using join buffer (Batch Key Access)
-1 SIMPLE t5 ref a a 5 test.t3.b X Using join buffer (Batch Key Access)
-1 SIMPLE t4 ref a a 5 test.t3.b X Using index condition; Using join buffer (Batch Key Access)
+1 SIMPLE t3 ref a a 5 test.t2.b X Using join buffer (Batched Key Access)
+1 SIMPLE t5 ref a a 5 test.t3.b X Using join buffer (Batched Key Access)
+1 SIMPLE t4 ref a a 5 test.t3.b X Using index condition; Using join buffer (Batched Key Access)
explain select * from (t4 join t6 on t6.a=t4.b) right join t3 on t4.a=t3.b
join t2 left join (t5 join t7 on t7.a=t5.b) on t5.a=t2.b where t3.a<=>t2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL X
-1 SIMPLE t3 ref a a 5 test.t2.b X Using index condition; Using join buffer (Batch Key Access)
-1 SIMPLE t4 ref a a 5 test.t3.b X Using join buffer (Batch Key Access)
-1 SIMPLE t6 ref a a 5 test.t4.b X Using join buffer (Batch Key Access)
-1 SIMPLE t5 ref a a 5 test.t2.b X Using join buffer (Batch Key Access)
-1 SIMPLE t7 ref a a 5 test.t5.b X Using join buffer (Batch Key Access)
+1 SIMPLE t3 ref a a 5 test.t2.b X Using index condition; Using join buffer (Batched Key Access)
+1 SIMPLE t4 ref a a 5 test.t3.b X Using join buffer (Batched Key Access)
+1 SIMPLE t6 ref a a 5 test.t4.b X Using join buffer (Batched Key Access)
+1 SIMPLE t5 ref a a 5 test.t2.b X Using join buffer (Batched Key Access)
+1 SIMPLE t7 ref a a 5 test.t5.b X Using join buffer (Batched Key Access)
explain select * from t2 left join
(t3 left join (t4 join t6 on t6.a=t4.b) on t4.a=t3.b
join t5 on t5.a=t3.b) on t3.a=t2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL X
-1 SIMPLE t3 ref a a 5 test.t2.b X Using join buffer (Batch Key Access)
-1 SIMPLE t4 ref a a 5 test.t3.b X Using join buffer (Batch Key Access)
-1 SIMPLE t6 ref a a 5 test.t4.b X Using join buffer (Batch Key Access)
-1 SIMPLE t5 ref a a 5 test.t3.b X Using join buffer (Batch Key Access)
+1 SIMPLE t3 ref a a 5 test.t2.b X Using join buffer (Batched Key Access)
+1 SIMPLE t4 ref a a 5 test.t3.b X Using join buffer (Batched Key Access)
+1 SIMPLE t6 ref a a 5 test.t4.b X Using join buffer (Batched Key Access)
+1 SIMPLE t5 ref a a 5 test.t3.b X Using join buffer (Batched Key Access)
drop table t0, t1, t2, t3, t4, t5, t6, t7;
create table t1 (a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
@@ -1479,8 +1479,8 @@ explain select * from t1 left join
on (t1.a = t2.a);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10
-1 SIMPLE t2 ref a a 5 test.t1.a 1 Using join buffer (Batch Key Access)
-1 SIMPLE t3 ref a a 5 test.t2.a 1 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref a a 5 test.t1.a 1 Using join buffer (Batched Key Access)
+1 SIMPLE t3 ref a a 5 test.t2.a 1 Using join buffer (Batched Key Access)
drop table t1, t2, t3;
CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, type varchar(10));
CREATE TABLE t2 (pid int NOT NULL PRIMARY KEY, type varchar(10));
@@ -1731,7 +1731,7 @@ LEFT JOIN
ON t4.carrier = t1.carrier;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index package_id package_id 5 NULL 45 Using where; Using index
-1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.package_id 1 Using join buffer (Batch Key Access)
+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.package_id 1 Using join buffer (Batched Key Access)
1 SIMPLE t4 eq_ref PRIMARY,id PRIMARY 2 test.t1.carrier 1
1 SIMPLE t5 ref carrier_id carrier_id 5 test.t4.id 22 Using index
1 SIMPLE t3 ref package_id package_id 5 test.t1.id 1 Using where; Using index
=== modified file 'mysql-test/r/join_outer_bka.result'
--- a/mysql-test/r/join_outer_bka.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/join_outer_bka.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
drop table if exists t0,t1,t2,t3,t4,t5;
CREATE TABLE t1 (
grp int(11) default NULL,
@@ -739,13 +739,13 @@ explain select s.*, '*', m.*, (s.match_1
order by m.match_id desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s ALL NULL NULL NULL NULL 10 Using temporary; Using filesort
-1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 Using join buffer (Batch Key Access)
+1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 Using join buffer (Batched Key Access)
explain select s.*, '*', m.*, (s.match_1_h - m.home) UUX from
(t2 s left join t1 m on m.match_id = 1)
order by UUX desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s ALL NULL NULL NULL NULL 10 Using temporary; Using filesort
-1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 Using join buffer (Batch Key Access)
+1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 Using join buffer (Batched Key Access)
select s.*, '*', m.*, (s.match_1_h - m.home) UUX from
(t2 s left join t1 m on m.match_id = 1)
order by UUX desc;
@@ -765,7 +765,7 @@ t2 s straight_join t1 m where m.match_id
order by UUX desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s ALL NULL NULL NULL NULL 10 Using temporary; Using filesort
-1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 Using join buffer (Batch Key Access)
+1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 Using join buffer (Batched Key Access)
select s.*, '*', m.*, (s.match_1_h - m.home) UUX from
t2 s straight_join t1 m where m.match_id = 1
order by UUX desc;
@@ -1132,15 +1132,15 @@ a b a b
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t1.a = t2.a WHERE t1.a = t2.a OR t1.a = t2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 4 Using where
-1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 Using join buffer (Batch Key Access)
+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 Using join buffer (Batched Key Access)
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t1.a = t2.a WHERE t1.a IN(t2.a, t2.b);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 4 Using where
-1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 Using join buffer (Batch Key Access)
+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 Using join buffer (Batched Key Access)
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t1.a = t2.a WHERE t1.a > IF(t1.a = t2.b-2, t2.b, t2.b-1);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 4 Using where
-1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 Using join buffer (Batch Key Access)
+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 Using join buffer (Batched Key Access)
DROP TABLE t1,t2;
DROP VIEW IF EXISTS v1,v2;
DROP TABLE IF EXISTS t1,t2;
=== modified file 'mysql-test/r/join_outer_bka_nobnl.result'
--- a/mysql-test/r/join_outer_bka_nobnl.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/join_outer_bka_nobnl.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
drop table if exists t0,t1,t2,t3,t4,t5;
CREATE TABLE t1 (
grp int(11) default NULL,
@@ -96,7 +96,7 @@ id select_type table type possible_keys
explain select t1.*,t2.* from t1 left join t2 on t1.a=t2.a where isnull(t2.a)=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 7
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a 1 Using where; Using join buffer (Batched Key Access)
select t1.*,t2.*,t3.a from t1 left join t2 on (t1.a=t2.a) left join t1 as t3 on (t2.a=t3.a);
grp a c id a c d a
1 1 a 1 1 a 1 1
@@ -739,13 +739,13 @@ explain select s.*, '*', m.*, (s.match_1
order by m.match_id desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s ALL NULL NULL NULL NULL 10 Using temporary; Using filesort
-1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 Using join buffer (Batch Key Access)
+1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 Using join buffer (Batched Key Access)
explain select s.*, '*', m.*, (s.match_1_h - m.home) UUX from
(t2 s left join t1 m on m.match_id = 1)
order by UUX desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s ALL NULL NULL NULL NULL 10 Using temporary; Using filesort
-1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 Using join buffer (Batch Key Access)
+1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 Using join buffer (Batched Key Access)
select s.*, '*', m.*, (s.match_1_h - m.home) UUX from
(t2 s left join t1 m on m.match_id = 1)
order by UUX desc;
@@ -765,7 +765,7 @@ t2 s straight_join t1 m where m.match_id
order by UUX desc;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE s ALL NULL NULL NULL NULL 10 Using temporary; Using filesort
-1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 Using join buffer (Batch Key Access)
+1 SIMPLE m const match_id,match_id_2 match_id 1 const 1 Using join buffer (Batched Key Access)
select s.*, '*', m.*, (s.match_1_h - m.home) UUX from
t2 s straight_join t1 m where m.match_id = 1
order by UUX desc;
@@ -1132,15 +1132,15 @@ a b a b
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t1.a = t2.a WHERE t1.a = t2.a OR t1.a = t2.b;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 4 Using where
-1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 Using join buffer (Batch Key Access)
+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 Using join buffer (Batched Key Access)
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t1.a = t2.a WHERE t1.a IN(t2.a, t2.b);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 4 Using where
-1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 Using join buffer (Batch Key Access)
+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 Using join buffer (Batched Key Access)
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t1.a = t2.a WHERE t1.a > IF(t1.a = t2.b-2, t2.b, t2.b-1);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL PRIMARY NULL NULL NULL 4 Using where
-1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 Using join buffer (Batch Key Access)
+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 Using join buffer (Batched Key Access)
DROP TABLE t1,t2;
DROP VIEW IF EXISTS v1,v2;
DROP TABLE IF EXISTS t1,t2;
@@ -1229,7 +1229,7 @@ EXPLAIN
SELECT t1.id, a FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.b IS NULL;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
-1 SIMPLE t2 ref idx idx 4 test.t1.id 2 Using where; Not exists; Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref idx idx 4 test.t1.id 2 Using where; Not exists; Using join buffer (Batched Key Access)
flush status;
SELECT t1.id, a FROM t1 LEFT JOIN t2 ON t1.id=t2.id WHERE t2.b IS NULL;
id a
=== modified file 'mysql-test/r/myisam_mrr.result'
--- a/mysql-test/r/myisam_mrr.result 2011-08-08 14:16:20 +0000
+++ b/mysql-test/r/myisam_mrr.result 2011-09-07 10:21:50 +0000
@@ -551,7 +551,7 @@ DROP TABLE t1, t2;
# Bug#12321461: CRASH IN DSMRR_IMPL::DSMRR_INIT ON SELECT STRAIGHT_JOIN
#
set @save_optimizer_switch = @@optimizer_switch;
-set optimizer_switch='block_nested_loop=off,batch_key_access=off';
+set optimizer_switch='block_nested_loop=off,batched_key_access=off';
CREATE TABLE t1 (
pk INTEGER,
c1 VARCHAR(1) NOT NULL,
=== modified file 'mysql-test/r/myisam_mrr_all.result'
--- a/mysql-test/r/myisam_mrr_all.result 2011-08-08 14:16:20 +0000
+++ b/mysql-test/r/myisam_mrr_all.result 2011-09-07 10:21:50 +0000
@@ -551,7 +551,7 @@ DROP TABLE t1, t2;
# Bug#12321461: CRASH IN DSMRR_IMPL::DSMRR_INIT ON SELECT STRAIGHT_JOIN
#
set @save_optimizer_switch = @@optimizer_switch;
-set optimizer_switch='block_nested_loop=off,batch_key_access=off';
+set optimizer_switch='block_nested_loop=off,batched_key_access=off';
CREATE TABLE t1 (
pk INTEGER,
c1 VARCHAR(1) NOT NULL,
=== modified file 'mysql-test/r/myisam_mrr_cost.result'
--- a/mysql-test/r/myisam_mrr_cost.result 2011-08-08 14:16:20 +0000
+++ b/mysql-test/r/myisam_mrr_cost.result 2011-09-07 10:21:50 +0000
@@ -551,7 +551,7 @@ DROP TABLE t1, t2;
# Bug#12321461: CRASH IN DSMRR_IMPL::DSMRR_INIT ON SELECT STRAIGHT_JOIN
#
set @save_optimizer_switch = @@optimizer_switch;
-set optimizer_switch='block_nested_loop=off,batch_key_access=off';
+set optimizer_switch='block_nested_loop=off,batched_key_access=off';
CREATE TABLE t1 (
pk INTEGER,
c1 VARCHAR(1) NOT NULL,
=== modified file 'mysql-test/r/myisam_mrr_cost_all.result'
--- a/mysql-test/r/myisam_mrr_cost_all.result 2011-08-08 14:16:20 +0000
+++ b/mysql-test/r/myisam_mrr_cost_all.result 2011-09-07 10:21:50 +0000
@@ -551,7 +551,7 @@ DROP TABLE t1, t2;
# Bug#12321461: CRASH IN DSMRR_IMPL::DSMRR_INIT ON SELECT STRAIGHT_JOIN
#
set @save_optimizer_switch = @@optimizer_switch;
-set optimizer_switch='block_nested_loop=off,batch_key_access=off';
+set optimizer_switch='block_nested_loop=off,batched_key_access=off';
CREATE TABLE t1 (
pk INTEGER,
c1 VARCHAR(1) NOT NULL,
=== modified file 'mysql-test/r/myisam_mrr_cost_icp.result'
--- a/mysql-test/r/myisam_mrr_cost_icp.result 2011-08-08 14:16:20 +0000
+++ b/mysql-test/r/myisam_mrr_cost_icp.result 2011-09-07 10:21:50 +0000
@@ -551,7 +551,7 @@ DROP TABLE t1, t2;
# Bug#12321461: CRASH IN DSMRR_IMPL::DSMRR_INIT ON SELECT STRAIGHT_JOIN
#
set @save_optimizer_switch = @@optimizer_switch;
-set optimizer_switch='block_nested_loop=off,batch_key_access=off';
+set optimizer_switch='block_nested_loop=off,batched_key_access=off';
CREATE TABLE t1 (
pk INTEGER,
c1 VARCHAR(1) NOT NULL,
=== modified file 'mysql-test/r/myisam_mrr_icp.result'
--- a/mysql-test/r/myisam_mrr_icp.result 2011-08-08 14:16:20 +0000
+++ b/mysql-test/r/myisam_mrr_icp.result 2011-09-07 10:21:50 +0000
@@ -551,7 +551,7 @@ DROP TABLE t1, t2;
# Bug#12321461: CRASH IN DSMRR_IMPL::DSMRR_INIT ON SELECT STRAIGHT_JOIN
#
set @save_optimizer_switch = @@optimizer_switch;
-set optimizer_switch='block_nested_loop=off,batch_key_access=off';
+set optimizer_switch='block_nested_loop=off,batched_key_access=off';
CREATE TABLE t1 (
pk INTEGER,
c1 VARCHAR(1) NOT NULL,
=== modified file 'mysql-test/r/myisam_mrr_none.result'
--- a/mysql-test/r/myisam_mrr_none.result 2011-08-08 14:16:20 +0000
+++ b/mysql-test/r/myisam_mrr_none.result 2011-09-07 10:21:50 +0000
@@ -550,7 +550,7 @@ DROP TABLE t1, t2;
# Bug#12321461: CRASH IN DSMRR_IMPL::DSMRR_INIT ON SELECT STRAIGHT_JOIN
#
set @save_optimizer_switch = @@optimizer_switch;
-set optimizer_switch='block_nested_loop=off,batch_key_access=off';
+set optimizer_switch='block_nested_loop=off,batched_key_access=off';
CREATE TABLE t1 (
pk INTEGER,
c1 VARCHAR(1) NOT NULL,
=== modified file 'mysql-test/r/mysqld--help-notwin.result'
--- a/mysql-test/r/mysqld--help-notwin.result 2011-08-20 00:25:14 +0000
+++ b/mysql-test/r/mysqld--help-notwin.result 2011-09-07 10:21:50 +0000
@@ -429,8 +429,8 @@ The following options may be given as th
is one of {index_merge, index_merge_union,
index_merge_sort_union, index_merge_intersection,
engine_condition_pushdown, index_condition_pushdown, mrr,
- mrr_cost_based, block_nested_loop, batch_key_access} and
- val is one of {on, off, default}
+ mrr_cost_based, block_nested_loop, batched_key_access}
+ and val is one of {on, off, default}
--optimizer-trace=name
Controls tracing of the Optimizer:
optimizer_trace=option=val[,option=val...], where option
=== modified file 'mysql-test/r/mysqld--help-win.result'
--- a/mysql-test/r/mysqld--help-win.result 2011-08-20 00:25:14 +0000
+++ b/mysql-test/r/mysqld--help-win.result 2011-09-07 10:21:50 +0000
@@ -429,8 +429,8 @@ The following options may be given as th
is one of {index_merge, index_merge_union,
index_merge_sort_union, index_merge_intersection,
engine_condition_pushdown, index_condition_pushdown, mrr,
- mrr_cost_based, block_nested_loop, batch_key_access} and
- val is one of {on, off, default}
+ mrr_cost_based, block_nested_loop, batched_key_access}
+ and val is one of {on, off, default}
--optimizer-trace=name
Controls tracing of the Optimizer:
optimizer_trace=option=val[,option=val...], where option
=== modified file 'mysql-test/r/optimizer_switch.result'
--- a/mysql-test/r/optimizer_switch.result 2011-08-17 08:55:41 +0000
+++ b/mysql-test/r/optimizer_switch.result 2011-09-07 10:21:50 +0000
@@ -3,47 +3,47 @@ BUG#37120 optimizer_switch allowable val
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off,materialization=on,semijoin=on,loosescan=on,firstmatch=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=on,loosescan=on,firstmatch=on
set optimizer_switch='default';
set optimizer_switch='materialization=off';
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off,materialization=off,semijoin=on,loosescan=on,firstmatch=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=off,semijoin=on,loosescan=on,firstmatch=on
set optimizer_switch='default';
set optimizer_switch='semijoin=off';
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off,materialization=on,semijoin=off,loosescan=on,firstmatch=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=off,loosescan=on,firstmatch=on
set optimizer_switch='default';
set optimizer_switch='loosescan=off';
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off,materialization=on,semijoin=on,loosescan=off,firstmatch=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=on,loosescan=off,firstmatch=on
set optimizer_switch='default';
set optimizer_switch='semijoin=off,materialization=off';
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off,materialization=off,semijoin=off,loosescan=on,firstmatch=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=off,semijoin=off,loosescan=on,firstmatch=on
set optimizer_switch='default';
set optimizer_switch='materialization=off,semijoin=off';
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off,materialization=off,semijoin=off,loosescan=on,firstmatch=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=off,semijoin=off,loosescan=on,firstmatch=on
set optimizer_switch='default';
set optimizer_switch='semijoin=off,materialization=off,loosescan=off';
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off,materialization=off,semijoin=off,loosescan=off,firstmatch=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=off,semijoin=off,loosescan=off,firstmatch=on
set optimizer_switch='default';
set optimizer_switch='semijoin=off,loosescan=off';
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off,materialization=on,semijoin=off,loosescan=off,firstmatch=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=off,loosescan=off,firstmatch=on
set optimizer_switch='default';
set optimizer_switch='materialization=off,loosescan=off';
select @@optimizer_switch;
@@optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off,materialization=off,semijoin=on,loosescan=off,firstmatch=on
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=off,semijoin=on,loosescan=off,firstmatch=on
set optimizer_switch='default';
create table t1 (a1 char(8), a2 char(8));
create table t2 (b1 char(8), b2 char(8));
=== modified file 'mysql-test/r/select_all_bka.result'
--- a/mysql-test/r/select_all_bka.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/select_all_bka.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
set optimizer_switch='semijoin=on,materialization=on,firstmatch=on,loosescan=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=off';
drop table if exists t1,t2,t3,t4,t11;
drop table if exists t1_1,t1_2,t9_1,t9_2,t1aa,t2aa;
@@ -606,15 +606,15 @@ id select_type table type possible_keys
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using temporary; Using filesort
-1 SIMPLE t3 ref period period 4 test.t1.period 4181 Using join buffer (Batch Key Access)
+1 SIMPLE t3 ref period period 4 test.t1.period 4181 Using join buffer (Batched Key Access)
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 ALL period NULL NULL NULL 41810 Using temporary; Using filesort
-1 SIMPLE t1 ref period period 4 test.t3.period 4181 Using join buffer (Batch Key Access)
+1 SIMPLE t1 ref period period 4 test.t3.period 4181 Using join buffer (Batched Key Access)
explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using temporary; Using filesort
-1 SIMPLE t3 ref period period 4 test.t1.period 4181 Using join buffer (Batch Key Access)
+1 SIMPLE t3 ref period period 4 test.t1.period 4181 Using join buffer (Batched Key Access)
select period from t1;
period
9410
@@ -1361,7 +1361,7 @@ count(*)
explain select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 1200
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using where; Not exists; Using join buffer (Batch Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using where; Not exists; Using join buffer (Batched Key Access)
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr is null;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 ALL NULL NULL NULL NULL 12
@@ -1381,15 +1381,15 @@ delete from t2 where fld1=999999;
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batch Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batched Key Access)
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batch Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batched Key Access)
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batch Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batched Key Access)
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
@@ -3459,7 +3459,7 @@ explain select * from t2 A, t2 B where A
and B.a=5 and B.b=A.e and (B.b =1 or B.b = 3 or B.b=5);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE A range PRIMARY PRIMARY 12 NULL 4 Using index condition; Using where; Using MRR
-1 SIMPLE B ref PRIMARY PRIMARY 8 const,test.A.e 10 Using join buffer (Batch Key Access)
+1 SIMPLE B ref PRIMARY PRIMARY 8 const,test.A.e 10 Using join buffer (Batched Key Access)
drop table t1, t2;
CREATE TABLE t1 (a int PRIMARY KEY, b int, INDEX(b));
INSERT INTO t1 VALUES (1, 3), (9,4), (7,5), (4,5), (6,2),
@@ -3473,12 +3473,12 @@ EXPLAIN
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using index condition; Using MRR
-1 SIMPLE t2 ref c c 5 test.t1.a 2 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref c c 5 test.t1.a 2 Using join buffer (Batched Key Access)
EXPLAIN
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6 AND a > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using index condition; Using where; Using MRR
-1 SIMPLE t2 ref c c 5 test.t1.a 2 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref c c 5 test.t1.a 2 Using join buffer (Batched Key Access)
DROP TABLE t1, t2;
create table t1 (
a int unsigned not null auto_increment primary key,
@@ -3568,19 +3568,19 @@ FROM t1 JOIN t2 ON t2.fk=t1.pk
WHERE t2.fk < 'c' AND t2.pk=t1.fk;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 3 Using index condition; Using where; Using MRR
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batched Key Access)
EXPLAIN SELECT t2.*
FROM t1 JOIN t2 ON t2.fk=t1.pk
WHERE t2.fk BETWEEN 'a' AND 'b' AND t2.pk=t1.fk;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 2 Using index condition; Using where; Using MRR
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batched Key Access)
EXPLAIN SELECT t2.*
FROM t1 JOIN t2 ON t2.fk=t1.pk
WHERE t2.fk IN ('a','b') AND t2.pk=t1.fk;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 2 Using index condition; Using where; Using MRR
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batched Key Access)
DROP TABLE t1,t2;
CREATE TABLE t1 (a int, b varchar(20) NOT NULL, PRIMARY KEY(a));
CREATE TABLE t2 (a int, b varchar(20) NOT NULL,
@@ -3615,7 +3615,7 @@ t3.a=t2.a AND t3.c IN ('bb','ee');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si si 5 NULL 4 Using index condition; Using where; Using MRR
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batched Key Access)
EXPLAIN
SELECT t3.a FROM t1,t2,t3
WHERE t1.id = 8 AND t2.i BETWEEN t1.b AND t1.e AND
@@ -3623,7 +3623,7 @@ t3.a=t2.a AND t3.c IN ('bb','ee') ;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si,ai si 5 NULL 4 Using index condition; Using where; Using MRR
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batched Key Access)
EXPLAIN
SELECT t3.a FROM t1,t2 FORCE INDEX (si),t3
WHERE t1.id = 8 AND (t2.i=t1.b OR t2.i=t1.e) AND t3.a=t2.a AND
@@ -3631,7 +3631,7 @@ t3.c IN ('bb','ee');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si si 5 NULL 2 Using index condition; Using where; Using MRR
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batched Key Access)
EXPLAIN
SELECT t3.a FROM t1,t2,t3
WHERE t1.id = 8 AND (t2.i=t1.b OR t2.i=t1.e) AND t3.a=t2.a AND
@@ -3639,7 +3639,7 @@ t3.c IN ('bb','ee');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si,ai si 5 NULL 2 Using index condition; Using where; Using MRR
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batched Key Access)
DROP TABLE t1,t2,t3;
CREATE TABLE t1 ( f1 int primary key, f2 int, f3 int, f4 int, f5 int, f6 int, checked_out int);
CREATE TABLE t2 ( f11 int PRIMARY KEY );
=== modified file 'mysql-test/r/select_all_bka_nobnl.result'
--- a/mysql-test/r/select_all_bka_nobnl.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/select_all_bka_nobnl.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
set optimizer_switch='semijoin=on,materialization=on,firstmatch=on,loosescan=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=off';
drop table if exists t1,t2,t3,t4,t11;
drop table if exists t1_1,t1_2,t9_1,t9_2,t1aa,t2aa;
@@ -606,15 +606,15 @@ id select_type table type possible_keys
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using temporary; Using filesort
-1 SIMPLE t3 ref period period 4 test.t1.period 4181 Using join buffer (Batch Key Access)
+1 SIMPLE t3 ref period period 4 test.t1.period 4181 Using join buffer (Batched Key Access)
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 ALL period NULL NULL NULL 41810 Using temporary; Using filesort
-1 SIMPLE t1 ref period period 4 test.t3.period 4181 Using join buffer (Batch Key Access)
+1 SIMPLE t1 ref period period 4 test.t3.period 4181 Using join buffer (Batched Key Access)
explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using temporary; Using filesort
-1 SIMPLE t3 ref period period 4 test.t1.period 4181 Using join buffer (Batch Key Access)
+1 SIMPLE t3 ref period period 4 test.t1.period 4181 Using join buffer (Batched Key Access)
select period from t1;
period
9410
@@ -1361,7 +1361,7 @@ count(*)
explain select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 1200
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using where; Not exists; Using join buffer (Batch Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using where; Not exists; Using join buffer (Batched Key Access)
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr is null;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 ALL NULL NULL NULL NULL 12
@@ -1381,15 +1381,15 @@ delete from t2 where fld1=999999;
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batch Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batched Key Access)
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batch Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batched Key Access)
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batch Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batched Key Access)
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
@@ -2365,7 +2365,7 @@ insert into t2 values (1,3), (2,3), (3,4
explain select * from t1 left join t2 on a=c where d in (4);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref c,d d 5 const 2 Using where
-1 SIMPLE t1 ref a a 5 test.t2.c 2 Using join buffer (Batch Key Access)
+1 SIMPLE t1 ref a a 5 test.t2.c 2 Using join buffer (Batched Key Access)
select * from t1 left join t2 on a=c where d in (4);
a b c d
3 2 3 4
@@ -2373,7 +2373,7 @@ a b c d
explain select * from t1 left join t2 on a=c where d = 4;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref c,d d 5 const 2 Using where
-1 SIMPLE t1 ref a a 5 test.t2.c 2 Using join buffer (Batch Key Access)
+1 SIMPLE t1 ref a a 5 test.t2.c 2 Using join buffer (Batched Key Access)
select * from t1 left join t2 on a=c where d = 4;
a b c d
3 2 3 4
@@ -3459,7 +3459,7 @@ explain select * from t2 A, t2 B where A
and B.a=5 and B.b=A.e and (B.b =1 or B.b = 3 or B.b=5);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE A range PRIMARY PRIMARY 12 NULL 5 Using index condition; Using where; Using MRR
-1 SIMPLE B ref PRIMARY PRIMARY 8 const,test.A.e 10 Using join buffer (Batch Key Access)
+1 SIMPLE B ref PRIMARY PRIMARY 8 const,test.A.e 10 Using join buffer (Batched Key Access)
drop table t1, t2;
CREATE TABLE t1 (a int PRIMARY KEY, b int, INDEX(b));
INSERT INTO t1 VALUES (1, 3), (9,4), (7,5), (4,5), (6,2),
@@ -3473,12 +3473,12 @@ EXPLAIN
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using index condition; Using MRR
-1 SIMPLE t2 ref c c 5 test.t1.a 2 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref c c 5 test.t1.a 2 Using join buffer (Batched Key Access)
EXPLAIN
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6 AND a > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using index condition; Using where; Using MRR
-1 SIMPLE t2 ref c c 5 test.t1.a 2 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref c c 5 test.t1.a 2 Using join buffer (Batched Key Access)
DROP TABLE t1, t2;
create table t1 (
a int unsigned not null auto_increment primary key,
@@ -3568,19 +3568,19 @@ FROM t1 JOIN t2 ON t2.fk=t1.pk
WHERE t2.fk < 'c' AND t2.pk=t1.fk;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 3 Using index condition; Using where; Using MRR
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batched Key Access)
EXPLAIN SELECT t2.*
FROM t1 JOIN t2 ON t2.fk=t1.pk
WHERE t2.fk BETWEEN 'a' AND 'b' AND t2.pk=t1.fk;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 2 Using index condition; Using where; Using MRR
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batched Key Access)
EXPLAIN SELECT t2.*
FROM t1 JOIN t2 ON t2.fk=t1.pk
WHERE t2.fk IN ('a','b') AND t2.pk=t1.fk;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 2 Using index condition; Using where; Using MRR
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batched Key Access)
DROP TABLE t1,t2;
CREATE TABLE t1 (a int, b varchar(20) NOT NULL, PRIMARY KEY(a));
CREATE TABLE t2 (a int, b varchar(20) NOT NULL,
@@ -3615,7 +3615,7 @@ t3.a=t2.a AND t3.c IN ('bb','ee');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si si 5 NULL 4 Using index condition; Using where; Using MRR
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batched Key Access)
EXPLAIN
SELECT t3.a FROM t1,t2,t3
WHERE t1.id = 8 AND t2.i BETWEEN t1.b AND t1.e AND
@@ -3623,7 +3623,7 @@ t3.a=t2.a AND t3.c IN ('bb','ee') ;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si,ai si 5 NULL 4 Using index condition; Using where; Using MRR
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batched Key Access)
EXPLAIN
SELECT t3.a FROM t1,t2 FORCE INDEX (si),t3
WHERE t1.id = 8 AND (t2.i=t1.b OR t2.i=t1.e) AND t3.a=t2.a AND
@@ -3631,7 +3631,7 @@ t3.c IN ('bb','ee');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si si 5 NULL 2 Using index condition; Using where; Using MRR
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batched Key Access)
EXPLAIN
SELECT t3.a FROM t1,t2,t3
WHERE t1.id = 8 AND (t2.i=t1.b OR t2.i=t1.e) AND t3.a=t2.a AND
@@ -3639,7 +3639,7 @@ t3.c IN ('bb','ee');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si,ai si 5 NULL 2 Using index condition; Using where; Using MRR
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batched Key Access)
DROP TABLE t1,t2,t3;
CREATE TABLE t1 ( f1 int primary key, f2 int, f3 int, f4 int, f5 int, f6 int, checked_out int);
CREATE TABLE t2 ( f11 int PRIMARY KEY );
=== modified file 'mysql-test/r/select_icp_mrr_bka.result'
--- a/mysql-test/r/select_icp_mrr_bka.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/select_icp_mrr_bka.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
set optimizer_switch='index_condition_pushdown=on,mrr=on,mrr_cost_based=off';
drop table if exists t1,t2,t3,t4,t11;
drop table if exists t1_1,t1_2,t9_1,t9_2,t1aa,t2aa;
@@ -606,15 +606,15 @@ id select_type table type possible_keys
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using temporary; Using filesort
-1 SIMPLE t3 ref period period 4 test.t1.period 4181 Using join buffer (Batch Key Access)
+1 SIMPLE t3 ref period period 4 test.t1.period 4181 Using join buffer (Batched Key Access)
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 ALL period NULL NULL NULL 41810 Using temporary; Using filesort
-1 SIMPLE t1 ref period period 4 test.t3.period 4181 Using join buffer (Batch Key Access)
+1 SIMPLE t1 ref period period 4 test.t3.period 4181 Using join buffer (Batched Key Access)
explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using temporary; Using filesort
-1 SIMPLE t3 ref period period 4 test.t1.period 4181 Using join buffer (Batch Key Access)
+1 SIMPLE t3 ref period period 4 test.t1.period 4181 Using join buffer (Batched Key Access)
select period from t1;
period
9410
@@ -1361,7 +1361,7 @@ count(*)
explain select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 1200
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using where; Not exists; Using join buffer (Batch Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using where; Not exists; Using join buffer (Batched Key Access)
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr is null;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 ALL NULL NULL NULL NULL 12
@@ -1381,15 +1381,15 @@ delete from t2 where fld1=999999;
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batch Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batched Key Access)
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batch Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batched Key Access)
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batch Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batched Key Access)
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
@@ -3459,7 +3459,7 @@ explain select * from t2 A, t2 B where A
and B.a=5 and B.b=A.e and (B.b =1 or B.b = 3 or B.b=5);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE A range PRIMARY PRIMARY 12 NULL 4 Using index condition; Using where; Using MRR
-1 SIMPLE B ref PRIMARY PRIMARY 8 const,test.A.e 10 Using join buffer (Batch Key Access)
+1 SIMPLE B ref PRIMARY PRIMARY 8 const,test.A.e 10 Using join buffer (Batched Key Access)
drop table t1, t2;
CREATE TABLE t1 (a int PRIMARY KEY, b int, INDEX(b));
INSERT INTO t1 VALUES (1, 3), (9,4), (7,5), (4,5), (6,2),
@@ -3473,12 +3473,12 @@ EXPLAIN
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using index condition; Using MRR
-1 SIMPLE t2 ref c c 5 test.t1.a 2 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref c c 5 test.t1.a 2 Using join buffer (Batched Key Access)
EXPLAIN
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6 AND a > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using index condition; Using where; Using MRR
-1 SIMPLE t2 ref c c 5 test.t1.a 2 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref c c 5 test.t1.a 2 Using join buffer (Batched Key Access)
DROP TABLE t1, t2;
create table t1 (
a int unsigned not null auto_increment primary key,
@@ -3568,19 +3568,19 @@ FROM t1 JOIN t2 ON t2.fk=t1.pk
WHERE t2.fk < 'c' AND t2.pk=t1.fk;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 3 Using index condition; Using where; Using MRR
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batched Key Access)
EXPLAIN SELECT t2.*
FROM t1 JOIN t2 ON t2.fk=t1.pk
WHERE t2.fk BETWEEN 'a' AND 'b' AND t2.pk=t1.fk;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 2 Using index condition; Using where; Using MRR
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batched Key Access)
EXPLAIN SELECT t2.*
FROM t1 JOIN t2 ON t2.fk=t1.pk
WHERE t2.fk IN ('a','b') AND t2.pk=t1.fk;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 2 Using index condition; Using where; Using MRR
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batched Key Access)
DROP TABLE t1,t2;
CREATE TABLE t1 (a int, b varchar(20) NOT NULL, PRIMARY KEY(a));
CREATE TABLE t2 (a int, b varchar(20) NOT NULL,
@@ -3615,7 +3615,7 @@ t3.a=t2.a AND t3.c IN ('bb','ee');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si si 5 NULL 4 Using index condition; Using where; Using MRR
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batched Key Access)
EXPLAIN
SELECT t3.a FROM t1,t2,t3
WHERE t1.id = 8 AND t2.i BETWEEN t1.b AND t1.e AND
@@ -3623,7 +3623,7 @@ t3.a=t2.a AND t3.c IN ('bb','ee') ;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si,ai si 5 NULL 4 Using index condition; Using where; Using MRR
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batched Key Access)
EXPLAIN
SELECT t3.a FROM t1,t2 FORCE INDEX (si),t3
WHERE t1.id = 8 AND (t2.i=t1.b OR t2.i=t1.e) AND t3.a=t2.a AND
@@ -3631,7 +3631,7 @@ t3.c IN ('bb','ee');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si si 5 NULL 2 Using index condition; Using where; Using MRR
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batched Key Access)
EXPLAIN
SELECT t3.a FROM t1,t2,t3
WHERE t1.id = 8 AND (t2.i=t1.b OR t2.i=t1.e) AND t3.a=t2.a AND
@@ -3639,7 +3639,7 @@ t3.c IN ('bb','ee');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si,ai si 5 NULL 2 Using index condition; Using where; Using MRR
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batched Key Access)
DROP TABLE t1,t2,t3;
CREATE TABLE t1 ( f1 int primary key, f2 int, f3 int, f4 int, f5 int, f6 int, checked_out int);
CREATE TABLE t2 ( f11 int PRIMARY KEY );
=== modified file 'mysql-test/r/select_icp_mrr_bka_nobnl.result'
--- a/mysql-test/r/select_icp_mrr_bka_nobnl.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/select_icp_mrr_bka_nobnl.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
set optimizer_switch='index_condition_pushdown=on,mrr=on,mrr_cost_based=off';
drop table if exists t1,t2,t3,t4,t11;
drop table if exists t1_1,t1_2,t9_1,t9_2,t1aa,t2aa;
@@ -606,15 +606,15 @@ id select_type table type possible_keys
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using temporary; Using filesort
-1 SIMPLE t3 ref period period 4 test.t1.period 4181 Using join buffer (Batch Key Access)
+1 SIMPLE t3 ref period period 4 test.t1.period 4181 Using join buffer (Batched Key Access)
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 ALL period NULL NULL NULL 41810 Using temporary; Using filesort
-1 SIMPLE t1 ref period period 4 test.t3.period 4181 Using join buffer (Batch Key Access)
+1 SIMPLE t1 ref period period 4 test.t3.period 4181 Using join buffer (Batched Key Access)
explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using temporary; Using filesort
-1 SIMPLE t3 ref period period 4 test.t1.period 4181 Using join buffer (Batch Key Access)
+1 SIMPLE t3 ref period period 4 test.t1.period 4181 Using join buffer (Batched Key Access)
select period from t1;
period
9410
@@ -1361,7 +1361,7 @@ count(*)
explain select t2.companynr,companyname from t2 left join t4 using (companynr) where t4.companynr is null;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 1200
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using where; Not exists; Using join buffer (Batch Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using where; Not exists; Using join buffer (Batched Key Access)
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr is null;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 ALL NULL NULL NULL NULL 12
@@ -1381,15 +1381,15 @@ delete from t2 where fld1=999999;
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batch Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batched Key Access)
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 or t2.companynr < 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batch Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batched Key Access)
explain select t2.companynr,companyname from t4 left join t2 using (companynr) where t2.companynr > 0 and t4.companynr > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ALL NULL NULL NULL NULL 1199 Using where
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batch Key Access)
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 1 test.t2.companynr 1 Using join buffer (Batched Key Access)
explain select companynr,companyname from t4 left join t2 using (companynr) where companynr > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 12 Using where
@@ -2365,7 +2365,7 @@ insert into t2 values (1,3), (2,3), (3,4
explain select * from t1 left join t2 on a=c where d in (4);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref c,d d 5 const 2 Using where
-1 SIMPLE t1 ref a a 5 test.t2.c 2 Using join buffer (Batch Key Access)
+1 SIMPLE t1 ref a a 5 test.t2.c 2 Using join buffer (Batched Key Access)
select * from t1 left join t2 on a=c where d in (4);
a b c d
3 2 3 4
@@ -2373,7 +2373,7 @@ a b c d
explain select * from t1 left join t2 on a=c where d = 4;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref c,d d 5 const 2 Using where
-1 SIMPLE t1 ref a a 5 test.t2.c 2 Using join buffer (Batch Key Access)
+1 SIMPLE t1 ref a a 5 test.t2.c 2 Using join buffer (Batched Key Access)
select * from t1 left join t2 on a=c where d = 4;
a b c d
3 2 3 4
@@ -3459,7 +3459,7 @@ explain select * from t2 A, t2 B where A
and B.a=5 and B.b=A.e and (B.b =1 or B.b = 3 or B.b=5);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE A range PRIMARY PRIMARY 12 NULL 5 Using index condition; Using where; Using MRR
-1 SIMPLE B ref PRIMARY PRIMARY 8 const,test.A.e 10 Using join buffer (Batch Key Access)
+1 SIMPLE B ref PRIMARY PRIMARY 8 const,test.A.e 10 Using join buffer (Batched Key Access)
drop table t1, t2;
CREATE TABLE t1 (a int PRIMARY KEY, b int, INDEX(b));
INSERT INTO t1 VALUES (1, 3), (9,4), (7,5), (4,5), (6,2),
@@ -3473,12 +3473,12 @@ EXPLAIN
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using index condition; Using MRR
-1 SIMPLE t2 ref c c 5 test.t1.a 2 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref c c 5 test.t1.a 2 Using join buffer (Batched Key Access)
EXPLAIN
SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6 AND a > 0;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY,b b 5 NULL 3 Using index condition; Using where; Using MRR
-1 SIMPLE t2 ref c c 5 test.t1.a 2 Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref c c 5 test.t1.a 2 Using join buffer (Batched Key Access)
DROP TABLE t1, t2;
create table t1 (
a int unsigned not null auto_increment primary key,
@@ -3568,19 +3568,19 @@ FROM t1 JOIN t2 ON t2.fk=t1.pk
WHERE t2.fk < 'c' AND t2.pk=t1.fk;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 3 Using index condition; Using where; Using MRR
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batched Key Access)
EXPLAIN SELECT t2.*
FROM t1 JOIN t2 ON t2.fk=t1.pk
WHERE t2.fk BETWEEN 'a' AND 'b' AND t2.pk=t1.fk;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 2 Using index condition; Using where; Using MRR
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batched Key Access)
EXPLAIN SELECT t2.*
FROM t1 JOIN t2 ON t2.fk=t1.pk
WHERE t2.fk IN ('a','b') AND t2.pk=t1.fk;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range PRIMARY PRIMARY 12 NULL 2 Using index condition; Using where; Using MRR
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 18 test.t1.fk 1 Using where; Using join buffer (Batched Key Access)
DROP TABLE t1,t2;
CREATE TABLE t1 (a int, b varchar(20) NOT NULL, PRIMARY KEY(a));
CREATE TABLE t2 (a int, b varchar(20) NOT NULL,
@@ -3615,7 +3615,7 @@ t3.a=t2.a AND t3.c IN ('bb','ee');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si si 5 NULL 4 Using index condition; Using where; Using MRR
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batched Key Access)
EXPLAIN
SELECT t3.a FROM t1,t2,t3
WHERE t1.id = 8 AND t2.i BETWEEN t1.b AND t1.e AND
@@ -3623,7 +3623,7 @@ t3.a=t2.a AND t3.c IN ('bb','ee') ;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si,ai si 5 NULL 4 Using index condition; Using where; Using MRR
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batched Key Access)
EXPLAIN
SELECT t3.a FROM t1,t2 FORCE INDEX (si),t3
WHERE t1.id = 8 AND (t2.i=t1.b OR t2.i=t1.e) AND t3.a=t2.a AND
@@ -3631,7 +3631,7 @@ t3.c IN ('bb','ee');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si si 5 NULL 2 Using index condition; Using where; Using MRR
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batched Key Access)
EXPLAIN
SELECT t3.a FROM t1,t2,t3
WHERE t1.id = 8 AND (t2.i=t1.b OR t2.i=t1.e) AND t3.a=t2.a AND
@@ -3639,7 +3639,7 @@ t3.c IN ('bb','ee');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1
1 SIMPLE t2 range si,ai si 5 NULL 2 Using index condition; Using where; Using MRR
-1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batch Key Access)
+1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where; Using join buffer (Batched Key Access)
DROP TABLE t1,t2,t3;
CREATE TABLE t1 ( f1 int primary key, f2 int, f3 int, f4 int, f5 int, f6 int, checked_out int);
CREATE TABLE t2 ( f11 int PRIMARY KEY );
=== modified file 'mysql-test/r/select_none_bka.result'
--- a/mysql-test/r/select_none_bka.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/select_none_bka.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
drop table if exists t1,t2,t3,t4,t11;
drop table if exists t1_1,t1_2,t9_1,t9_2,t1aa,t2aa;
drop view if exists v1;
=== modified file 'mysql-test/r/select_none_bka_nobnl.result'
--- a/mysql-test/r/select_none_bka_nobnl.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/select_none_bka_nobnl.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
drop table if exists t1,t2,t3,t4,t11;
drop table if exists t1_1,t1_2,t9_1,t9_2,t1aa,t2aa;
drop view if exists v1;
=== modified file 'mysql-test/r/subquery_all_bka.result'
--- a/mysql-test/r/subquery_all_bka.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_all_bka.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
set optimizer_switch='semijoin=on,materialization=on,firstmatch=on,loosescan=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=off';
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t11,t12;
select (select 2);
@@ -1674,8 +1674,8 @@ id text id text id text
explain extended select * from t1 a left join t2 b on (a.id=b.id or b.id is null) join t1 c on (if(isnull(b.id), 1000, b.id)=c.id);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE a ALL NULL NULL NULL NULL 14 100.00
-1 SIMPLE b eq_ref PRIMARY PRIMARY 4 test.a.id 2 100.00 Using join buffer (Batch Key Access)
-1 SIMPLE c eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using index condition; Using join buffer (Batch Key Access)
+1 SIMPLE b eq_ref PRIMARY PRIMARY 4 test.a.id 2 100.00 Using join buffer (Batched Key Access)
+1 SIMPLE c eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using index condition; Using join buffer (Batched Key Access)
Warnings:
Note 1003 /* select#1 */ select `test`.`a`.`id` AS `id`,`test`.`a`.`text` AS `text`,`test`.`b`.`id` AS `id`,`test`.`b`.`text` AS `text`,`test`.`c`.`id` AS `id`,`test`.`c`.`text` AS `text` from `test`.`t1` `a` left join `test`.`t2` `b` on(((`test`.`b`.`id` = `test`.`a`.`id`) or isnull(`test`.`b`.`id`))) join `test`.`t1` `c` where (if(isnull(`test`.`b`.`id`),1000,`test`.`b`.`id`) = `test`.`c`.`id`)
drop table t1,t2;
@@ -4354,7 +4354,7 @@ from t3;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00
2 DEPENDENT SUBQUERY t1 ref_or_null a a 5 func 4 100.00 Using where; Full scan on NULL key
-2 DEPENDENT SUBQUERY t2 ref a a 5 test.t1.b 1 100.00 Using where; Using join buffer (Batch Key Access)
+2 DEPENDENT SUBQUERY t2 ref a a 5 test.t1.b 1 100.00 Using where; Using join buffer (Batched Key Access)
Warnings:
Note 1276 Field or reference 'test.t3.oref' of SELECT #2 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a`,`test`.`t3`.`oref` AS `oref`,<in_optimizer>(`test`.`t3`.`a`,<exists>(/* select#2 */ select 1 from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t2`.`b` = `test`.`t3`.`oref`) and trigcond_if(outer_field_is_not_null, ((<cache>(`test`.`t3`.`a`) = `test`.`t1`.`a`) or isnull(`test`.`t1`.`a`)), true)) having trigcond_if(outer_field_is_not_null, <is_not_null_test>(`test`.`t1`.`a`), true))) AS `Z` from `test`.`t3`
@@ -4382,7 +4382,7 @@ from t3;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00
2 DEPENDENT SUBQUERY t1 ref a a 4 func 2 100.00 Using where; Full scan on NULL key
-2 DEPENDENT SUBQUERY t2 ref a a 4 test.t1.b 1 100.00 Using where; Using join buffer (Batch Key Access)
+2 DEPENDENT SUBQUERY t2 ref a a 4 test.t1.b 1 100.00 Using where; Using join buffer (Batched Key Access)
Warnings:
Note 1276 Field or reference 'test.t3.oref' of SELECT #2 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a`,`test`.`t3`.`oref` AS `oref`,<in_optimizer>(`test`.`t3`.`a`,<exists>(/* select#2 */ select 1 from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t2`.`b` = `test`.`t3`.`oref`) and trigcond_if(outer_field_is_not_null, (<cache>(`test`.`t3`.`a`) = `test`.`t1`.`a`), true)))) AS `Z` from `test`.`t3`
=== modified file 'mysql-test/r/subquery_all_bka_nobnl.result'
--- a/mysql-test/r/subquery_all_bka_nobnl.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_all_bka_nobnl.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
set optimizer_switch='semijoin=on,materialization=on,firstmatch=on,loosescan=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=off';
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t11,t12;
select (select 2);
@@ -1674,8 +1674,8 @@ id text id text id text
explain extended select * from t1 a left join t2 b on (a.id=b.id or b.id is null) join t1 c on (if(isnull(b.id), 1000, b.id)=c.id);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE a ALL NULL NULL NULL NULL 14 100.00
-1 SIMPLE b eq_ref PRIMARY PRIMARY 4 test.a.id 2 100.00 Using join buffer (Batch Key Access)
-1 SIMPLE c eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using index condition; Using join buffer (Batch Key Access)
+1 SIMPLE b eq_ref PRIMARY PRIMARY 4 test.a.id 2 100.00 Using join buffer (Batched Key Access)
+1 SIMPLE c eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using index condition; Using join buffer (Batched Key Access)
Warnings:
Note 1003 /* select#1 */ select `test`.`a`.`id` AS `id`,`test`.`a`.`text` AS `text`,`test`.`b`.`id` AS `id`,`test`.`b`.`text` AS `text`,`test`.`c`.`id` AS `id`,`test`.`c`.`text` AS `text` from `test`.`t1` `a` left join `test`.`t2` `b` on(((`test`.`b`.`id` = `test`.`a`.`id`) or isnull(`test`.`b`.`id`))) join `test`.`t1` `c` where (if(isnull(`test`.`b`.`id`),1000,`test`.`b`.`id`) = `test`.`c`.`id`)
drop table t1,t2;
@@ -4354,7 +4354,7 @@ from t3;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00
2 DEPENDENT SUBQUERY t1 ref_or_null a a 5 func 4 100.00 Using where; Full scan on NULL key
-2 DEPENDENT SUBQUERY t2 ref a a 5 test.t1.b 1 100.00 Using where; Using join buffer (Batch Key Access)
+2 DEPENDENT SUBQUERY t2 ref a a 5 test.t1.b 1 100.00 Using where; Using join buffer (Batched Key Access)
Warnings:
Note 1276 Field or reference 'test.t3.oref' of SELECT #2 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a`,`test`.`t3`.`oref` AS `oref`,<in_optimizer>(`test`.`t3`.`a`,<exists>(/* select#2 */ select 1 from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t2`.`b` = `test`.`t3`.`oref`) and trigcond_if(outer_field_is_not_null, ((<cache>(`test`.`t3`.`a`) = `test`.`t1`.`a`) or isnull(`test`.`t1`.`a`)), true)) having trigcond_if(outer_field_is_not_null, <is_not_null_test>(`test`.`t1`.`a`), true))) AS `Z` from `test`.`t3`
@@ -4382,7 +4382,7 @@ from t3;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00
2 DEPENDENT SUBQUERY t1 ref a a 4 func 2 100.00 Using where; Full scan on NULL key
-2 DEPENDENT SUBQUERY t2 ref a a 4 test.t1.b 1 100.00 Using where; Using join buffer (Batch Key Access)
+2 DEPENDENT SUBQUERY t2 ref a a 4 test.t1.b 1 100.00 Using where; Using join buffer (Batched Key Access)
Warnings:
Note 1276 Field or reference 'test.t3.oref' of SELECT #2 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a`,`test`.`t3`.`oref` AS `oref`,<in_optimizer>(`test`.`t3`.`a`,<exists>(/* select#2 */ select 1 from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t2`.`b` = `test`.`t3`.`oref`) and trigcond_if(outer_field_is_not_null, (<cache>(`test`.`t3`.`a`) = `test`.`t1`.`a`), true)))) AS `Z` from `test`.`t3`
=== modified file 'mysql-test/r/subquery_nomat_nosj_bka.result'
--- a/mysql-test/r/subquery_nomat_nosj_bka.result 2011-08-19 11:41:38 +0000
+++ b/mysql-test/r/subquery_nomat_nosj_bka.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
set optimizer_switch='index_condition_pushdown=on,mrr=on,mrr_cost_based=off';
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t11,t12;
select (select 2);
@@ -1674,8 +1674,8 @@ id text id text id text
explain extended select * from t1 a left join t2 b on (a.id=b.id or b.id is null) join t1 c on (if(isnull(b.id), 1000, b.id)=c.id);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE a ALL NULL NULL NULL NULL 14 100.00
-1 SIMPLE b eq_ref PRIMARY PRIMARY 4 test.a.id 2 100.00 Using join buffer (Batch Key Access)
-1 SIMPLE c eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using index condition; Using join buffer (Batch Key Access)
+1 SIMPLE b eq_ref PRIMARY PRIMARY 4 test.a.id 2 100.00 Using join buffer (Batched Key Access)
+1 SIMPLE c eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using index condition; Using join buffer (Batched Key Access)
Warnings:
Note 1003 /* select#1 */ select `test`.`a`.`id` AS `id`,`test`.`a`.`text` AS `text`,`test`.`b`.`id` AS `id`,`test`.`b`.`text` AS `text`,`test`.`c`.`id` AS `id`,`test`.`c`.`text` AS `text` from `test`.`t1` `a` left join `test`.`t2` `b` on(((`test`.`b`.`id` = `test`.`a`.`id`) or isnull(`test`.`b`.`id`))) join `test`.`t1` `c` where (if(isnull(`test`.`b`.`id`),1000,`test`.`b`.`id`) = `test`.`c`.`id`)
drop table t1,t2;
@@ -4354,7 +4354,7 @@ from t3;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00
2 DEPENDENT SUBQUERY t1 ref_or_null a a 5 func 4 100.00 Using where; Full scan on NULL key
-2 DEPENDENT SUBQUERY t2 ref a a 5 test.t1.b 1 100.00 Using where; Using join buffer (Batch Key Access)
+2 DEPENDENT SUBQUERY t2 ref a a 5 test.t1.b 1 100.00 Using where; Using join buffer (Batched Key Access)
Warnings:
Note 1276 Field or reference 'test.t3.oref' of SELECT #2 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a`,`test`.`t3`.`oref` AS `oref`,<in_optimizer>(`test`.`t3`.`a`,<exists>(/* select#2 */ select 1 from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t2`.`b` = `test`.`t3`.`oref`) and trigcond_if(outer_field_is_not_null, ((<cache>(`test`.`t3`.`a`) = `test`.`t1`.`a`) or isnull(`test`.`t1`.`a`)), true)) having trigcond_if(outer_field_is_not_null, <is_not_null_test>(`test`.`t1`.`a`), true))) AS `Z` from `test`.`t3`
@@ -4382,7 +4382,7 @@ from t3;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00
2 DEPENDENT SUBQUERY t1 ref a a 4 func 2 100.00 Using where; Full scan on NULL key
-2 DEPENDENT SUBQUERY t2 ref a a 4 test.t1.b 1 100.00 Using where; Using join buffer (Batch Key Access)
+2 DEPENDENT SUBQUERY t2 ref a a 4 test.t1.b 1 100.00 Using where; Using join buffer (Batched Key Access)
Warnings:
Note 1276 Field or reference 'test.t3.oref' of SELECT #2 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a`,`test`.`t3`.`oref` AS `oref`,<in_optimizer>(`test`.`t3`.`a`,<exists>(/* select#2 */ select 1 from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t2`.`b` = `test`.`t3`.`oref`) and trigcond_if(outer_field_is_not_null, (<cache>(`test`.`t3`.`a`) = `test`.`t1`.`a`), true)))) AS `Z` from `test`.`t3`
=== modified file 'mysql-test/r/subquery_nomat_nosj_bka_nobnl.result'
--- a/mysql-test/r/subquery_nomat_nosj_bka_nobnl.result 2011-08-19 11:41:38 +0000
+++ b/mysql-test/r/subquery_nomat_nosj_bka_nobnl.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
set optimizer_switch='index_condition_pushdown=on,mrr=on,mrr_cost_based=off';
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t11,t12;
select (select 2);
@@ -1674,8 +1674,8 @@ id text id text id text
explain extended select * from t1 a left join t2 b on (a.id=b.id or b.id is null) join t1 c on (if(isnull(b.id), 1000, b.id)=c.id);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE a ALL NULL NULL NULL NULL 14 100.00
-1 SIMPLE b eq_ref PRIMARY PRIMARY 4 test.a.id 2 100.00 Using join buffer (Batch Key Access)
-1 SIMPLE c eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using index condition; Using join buffer (Batch Key Access)
+1 SIMPLE b eq_ref PRIMARY PRIMARY 4 test.a.id 2 100.00 Using join buffer (Batched Key Access)
+1 SIMPLE c eq_ref PRIMARY PRIMARY 4 func 1 100.00 Using index condition; Using join buffer (Batched Key Access)
Warnings:
Note 1003 /* select#1 */ select `test`.`a`.`id` AS `id`,`test`.`a`.`text` AS `text`,`test`.`b`.`id` AS `id`,`test`.`b`.`text` AS `text`,`test`.`c`.`id` AS `id`,`test`.`c`.`text` AS `text` from `test`.`t1` `a` left join `test`.`t2` `b` on(((`test`.`b`.`id` = `test`.`a`.`id`) or isnull(`test`.`b`.`id`))) join `test`.`t1` `c` where (if(isnull(`test`.`b`.`id`),1000,`test`.`b`.`id`) = `test`.`c`.`id`)
drop table t1,t2;
@@ -4354,7 +4354,7 @@ from t3;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00
2 DEPENDENT SUBQUERY t1 ref_or_null a a 5 func 4 100.00 Using where; Full scan on NULL key
-2 DEPENDENT SUBQUERY t2 ref a a 5 test.t1.b 1 100.00 Using where; Using join buffer (Batch Key Access)
+2 DEPENDENT SUBQUERY t2 ref a a 5 test.t1.b 1 100.00 Using where; Using join buffer (Batched Key Access)
Warnings:
Note 1276 Field or reference 'test.t3.oref' of SELECT #2 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a`,`test`.`t3`.`oref` AS `oref`,<in_optimizer>(`test`.`t3`.`a`,<exists>(/* select#2 */ select 1 from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t2`.`b` = `test`.`t3`.`oref`) and trigcond_if(outer_field_is_not_null, ((<cache>(`test`.`t3`.`a`) = `test`.`t1`.`a`) or isnull(`test`.`t1`.`a`)), true)) having trigcond_if(outer_field_is_not_null, <is_not_null_test>(`test`.`t1`.`a`), true))) AS `Z` from `test`.`t3`
@@ -4382,7 +4382,7 @@ from t3;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t3 ALL NULL NULL NULL NULL 3 100.00
2 DEPENDENT SUBQUERY t1 ref a a 4 func 2 100.00 Using where; Full scan on NULL key
-2 DEPENDENT SUBQUERY t2 ref a a 4 test.t1.b 1 100.00 Using where; Using join buffer (Batch Key Access)
+2 DEPENDENT SUBQUERY t2 ref a a 4 test.t1.b 1 100.00 Using where; Using join buffer (Batched Key Access)
Warnings:
Note 1276 Field or reference 'test.t3.oref' of SELECT #2 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t3`.`a` AS `a`,`test`.`t3`.`oref` AS `oref`,<in_optimizer>(`test`.`t3`.`a`,<exists>(/* select#2 */ select 1 from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t2`.`b` = `test`.`t3`.`oref`) and trigcond_if(outer_field_is_not_null, (<cache>(`test`.`t3`.`a`) = `test`.`t1`.`a`), true)))) AS `Z` from `test`.`t3`
=== modified file 'mysql-test/r/subquery_none_bka.result'
--- a/mysql-test/r/subquery_none_bka.result 2011-08-19 11:41:38 +0000
+++ b/mysql-test/r/subquery_none_bka.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t11,t12;
select (select 2);
(select 2)
=== modified file 'mysql-test/r/subquery_none_bka_nobnl.result'
--- a/mysql-test/r/subquery_none_bka_nobnl.result 2011-08-19 11:41:38 +0000
+++ b/mysql-test/r/subquery_none_bka_nobnl.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t11,t12;
select (select 2);
(select 2)
=== modified file 'mysql-test/r/subquery_sj_all_bka.result'
--- a/mysql-test/r/subquery_sj_all_bka.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_all_bka.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
set optimizer_switch='semijoin=on,materialization=on,firstmatch=on,loosescan=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=off';
drop table if exists t0, t1, t2, t10, t11, t12;
create table t1 (a int not null, b int, primary key (a));
@@ -152,7 +152,7 @@ flattening a nested subquery
explain select * from t1 where a in (select pk from t10 where t10.a in (select pk from t12));
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
-1 PRIMARY t10 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where; Using join buffer (Batch Key Access)
+1 PRIMARY t10 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where; Using join buffer (Batched Key Access)
1 PRIMARY t12 eq_ref PRIMARY PRIMARY 4 test.t10.a 1 Using index
select * from t1 where a in (select pk from t10 where t10.a in (select pk from t12));
a b
@@ -163,7 +163,7 @@ flattening subquery w/ several tables
explain extended select * from t1 where a in (select t10.pk from t10, t12 where t12.pk=t10.a);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 PRIMARY t10 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 100.00 Using where; Using join buffer (Batch Key Access)
+1 PRIMARY t10 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 100.00 Using where; Using join buffer (Batched Key Access)
1 PRIMARY t12 eq_ref PRIMARY PRIMARY 4 test.t10.a 1 100.00 Using index
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t10` join `test`.`t12` join `test`.`t1` where ((`test`.`t10`.`pk` = `test`.`t1`.`a`) and (`test`.`t12`.`pk` = `test`.`t10`.`a`))
@@ -3089,7 +3089,7 @@ insert into t3 select A.a + 10*B.a, 'fil
explain select * from t3 where a in (select a from t2) and (a > 5 or a < 10);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where; Start temporary
-1 PRIMARY t3 ref a a 5 test.t2.a 1 End temporary; Using join buffer (Batch Key Access)
+1 PRIMARY t3 ref a a 5 test.t2.a 1 End temporary; Using join buffer (Batched Key Access)
select * from t3 where a in (select a from t2);
a filler
1 filler
@@ -3135,7 +3135,7 @@ explain select * from t1, t3 where t3.a
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 10 Using where
1 PRIMARY t2 ALL NULL NULL NULL NULL 10 Using where; Materialize; Scan
-1 PRIMARY t3 ref a a 5 test.t2.a 10 Using join buffer (Batch Key Access)
+1 PRIMARY t3 ref a a 5 test.t2.a 10 Using join buffer (Batched Key Access)
explain select straight_join * from t1 A, t1 B where A.a in (select a from t2);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY A ALL NULL NULL NULL NULL 10 Using where
@@ -3164,13 +3164,13 @@ explain select * from t0, t3 where t3.a
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t0 system NULL NULL NULL NULL 1
1 PRIMARY t2 ALL NULL NULL NULL NULL 10 Using where; Materialize; Scan
-1 PRIMARY t3 ref a a 5 test.t2.a 10 Using join buffer (Batch Key Access)
+1 PRIMARY t3 ref a a 5 test.t2.a 10 Using join buffer (Batched Key Access)
create table t4 as select a as x, a as y from t1;
explain select * from t0, t3 where (t3.a, t3.b) in (select x,y from t4) and (t3.a < 10 or t3.a >30);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t0 system NULL NULL NULL NULL 1
1 PRIMARY t4 ALL NULL NULL NULL NULL 10 Using where; Materialize; Scan
-1 PRIMARY t3 ref a a 5 test.t4.x 10 Using where; Using join buffer (Batch Key Access)
+1 PRIMARY t3 ref a a 5 test.t4.x 10 Using where; Using join buffer (Batched Key Access)
drop table t0,t1,t2,t3,t4;
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
@@ -4047,7 +4047,7 @@ EXPLAIN EXTENDED SELECT vkey FROM t0 WHE
(SELECT t1.pk FROM t0 t1 JOIN t0 t2 ON t2.vkey = t1.vnokey);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t0 ALL PRIMARY NULL NULL NULL 5 100.00
-1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t0.pk 1 100.00 Using where; Using join buffer (Batch Key Access)
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t0.pk 1 100.00 Using where; Using join buffer (Batched Key Access)
1 PRIMARY t2 ref vkey vkey 4 test.t1.vnokey 2 100.00 Using index; FirstMatch(t1)
Warnings:
Note 1003 /* select#1 */ select `test`.`t0`.`vkey` AS `vkey` from `test`.`t0` `t1` semi join (`test`.`t0` `t2`) join `test`.`t0` where ((`test`.`t2`.`vkey` = `test`.`t1`.`vnokey`) and (`test`.`t1`.`pk` = `test`.`t0`.`pk`))
@@ -4767,7 +4767,7 @@ WHERE cona.postalStripped='T2H3B2'
);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY cona ALL NULL NULL NULL NULL 2 100.00 Using where; Start temporary
-1 PRIMARY c eq_ref PRIMARY PRIMARY 4 test.cona.idContact 1 100.00 Using where; Using join buffer (Batch Key Access)
+1 PRIMARY c eq_ref PRIMARY PRIMARY 4 test.cona.idContact 1 100.00 Using where; Using join buffer (Batched Key Access)
1 PRIMARY a eq_ref PRIMARY PRIMARY 4 test.c.idObj 1 100.00 Using index; End temporary
Warnings:
Note 1003 /* select#1 */ select `test`.`a`.`idIndividual` AS `idIndividual` from `test`.`t1` `a` semi join (`test`.`t3` `cona` join `test`.`t2` `c`) where ((`test`.`c`.`idContact` = `test`.`cona`.`idContact`) and (`test`.`a`.`idIndividual` = `test`.`c`.`idObj`) and (`test`.`cona`.`postalStripped` = 'T2H3B2'))
@@ -4872,7 +4872,7 @@ CREATE INDEX I2 ON t1 (b);
EXPLAIN SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index I1 I1 2 NULL 2 Using where; Using index; LooseScan
-1 PRIMARY t1 ref I2 I2 13 test.t1.a 2 Using index condition; Using join buffer (Batch Key Access)
+1 PRIMARY t1 ref I2 I2 13 test.t1.a 2 Using index condition; Using join buffer (Batched Key Access)
SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1);
a b
CREATE TABLE t2 (a VARCHAR(1), b VARCHAR(10));
@@ -4882,14 +4882,14 @@ CREATE INDEX I2 ON t2 (b);
EXPLAIN SELECT a,b FROM t2 WHERE b IN (SELECT a FROM t2);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 index I1 I1 4 NULL 2 Using where; Using index; LooseScan
-1 PRIMARY t2 ref I2 I2 13 test.t2.a 2 Using index condition; Using join buffer (Batch Key Access)
+1 PRIMARY t2 ref I2 I2 13 test.t2.a 2 Using index condition; Using join buffer (Batched Key Access)
SELECT a,b FROM t2 WHERE b IN (SELECT a FROM t2);
a b
EXPLAIN
SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1 WHERE LENGTH(a)<500);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index I1 I1 2 NULL 2 Using where; Using index; LooseScan
-1 PRIMARY t1 ref I2 I2 13 test.t1.a 2 Using index condition; Using join buffer (Batch Key Access)
+1 PRIMARY t1 ref I2 I2 13 test.t1.a 2 Using index condition; Using join buffer (Batched Key Access)
SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1 WHERE LENGTH(a)<500);
a b
DROP TABLE t1,t2;
@@ -5237,7 +5237,7 @@ where t1.uid in (select t4.uid from t4,
and t2.uid=t1.fid;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t4 ALL NULL NULL NULL NULL 1 Start temporary
-1 PRIMARY t3 ref uid uid 5 const 1 Using where; Using join buffer (Batch Key Access)
+1 PRIMARY t3 ref uid uid 5 const 1 Using where; Using join buffer (Batched Key Access)
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using join buffer (Block Nested Loop)
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where; End temporary; Using join buffer (Block Nested Loop)
select t2.uid from t2, t1
@@ -5318,8 +5318,8 @@ WHERE Language='English' AND Percentage
t2.Population > 100000);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 range Population,Country Population 4 NULL 1 Using index condition; Using MRR; Start temporary
-1 PRIMARY t2 eq_ref PRIMARY,Population PRIMARY 3 test.t1.Country 1 Using where; Using join buffer (Batch Key Access)
-1 PRIMARY t3 eq_ref PRIMARY,Percentage PRIMARY 33 test.t2.Code,const 1 Using index condition; Using where; End temporary; Using join buffer (Batch Key Access)
+1 PRIMARY t2 eq_ref PRIMARY,Population PRIMARY 3 test.t1.Country 1 Using where; Using join buffer (Batched Key Access)
+1 PRIMARY t3 eq_ref PRIMARY,Percentage PRIMARY 33 test.t2.Code,const 1 Using index condition; Using where; End temporary; Using join buffer (Batched Key Access)
DROP TABLE t1,t2,t3;
CREATE TABLE t1 (
Code char(3) NOT NULL DEFAULT '',
@@ -5377,8 +5377,8 @@ where t0.a in ( select t1.a from t1,t2 w
t1.b=t2.b);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t0 ALL NULL NULL NULL NULL 5 100.00 Using where; Start temporary
-1 PRIMARY t1 ref a a 5 test.t0.a 1 100.00 Using join buffer (Batch Key Access)
-1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 test.t0.a 1 100.00 Using where; End temporary; Using join buffer (Batch Key Access)
+1 PRIMARY t1 ref a a 5 test.t0.a 1 100.00 Using join buffer (Batched Key Access)
+1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 test.t0.a 1 100.00 Using where; End temporary; Using join buffer (Batched Key Access)
Warnings:
Note 1276 Field or reference 'test.t0.a' of SELECT #2 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t0`.`a` AS `a` from `test`.`t2` semi join (`test`.`t1`) join `test`.`t0` where ((`test`.`t2`.`b` = `test`.`t1`.`b`) and (`test`.`t1`.`a` = `test`.`t0`.`a`) and (`test`.`t2`.`a` = `test`.`t0`.`a`))
@@ -5862,7 +5862,7 @@ and t2.uid=t1.fid;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 ref uid uid 5 const 4 Using where; Start temporary
1 PRIMARY t4 eq_ref PRIMARY PRIMARY 4 test.t3.fid 1 Using index
-1 PRIMARY t1 ref uid uid 5 test.t4.uid 2 Using index condition; End temporary; Using join buffer (Batch Key Access)
+1 PRIMARY t1 ref uid uid 5 test.t4.uid 2 Using index condition; End temporary; Using join buffer (Batched Key Access)
1 PRIMARY t2 ALL PRIMARY NULL NULL NULL 9 Using where; Using join buffer (Block Nested Loop)
select name from t2, t1
where t1.uid in (select t4.uid from t4, t3 where t3.uid=1 and t4.uid=t3.fid)
@@ -5921,7 +5921,7 @@ WHERE user_id = 'nicke'
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 system PRIMARY NULL NULL NULL 1
1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4
-1 PRIMARY t2 ref PRIMARY PRIMARY 4 test.t1.id 1 Using where; FirstMatch(t1); Using join buffer (Batch Key Access)
+1 PRIMARY t2 ref PRIMARY PRIMARY 4 test.t1.id 1 Using where; FirstMatch(t1); Using join buffer (Batched Key Access)
SELECT t1.partner_id
FROM t1
WHERE t1.id IN (
@@ -5949,12 +5949,12 @@ EXECUTE stmt;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 system PRIMARY NULL NULL NULL 1
1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4
-1 PRIMARY t2 ref PRIMARY PRIMARY 4 test.t1.id 1 Using where; FirstMatch(t1); Using join buffer (Batch Key Access)
+1 PRIMARY t2 ref PRIMARY PRIMARY 4 test.t1.id 1 Using where; FirstMatch(t1); Using join buffer (Batched Key Access)
EXECUTE stmt;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 system PRIMARY NULL NULL NULL 1
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 4
-1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.id 1 Using where; FirstMatch(t1); Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.id 1 Using where; FirstMatch(t1); Using join buffer (Batched Key Access)
PREPARE stmt FROM
'SELECT t1.partner_id
FROM t1
@@ -6509,7 +6509,7 @@ AND outr.col_varchar_nokey < 't'
ORDER BY outr.col_varchar_key, outr.pk;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY innr index PRIMARY,col_varchar_key col_varchar_key 7 NULL 20 Using where; Using index; Using temporary; Using filesort; LooseScan
-1 PRIMARY outr ref col_varchar_key col_varchar_key 3 test.innr.col_varchar_key 1 Using where; Using join buffer (Batch Key Access)
+1 PRIMARY outr ref col_varchar_key col_varchar_key 3 test.innr.col_varchar_key 1 Using where; Using join buffer (Batched Key Access)
SELECT outr.col_varchar_key AS x, outr.pk AS y
FROM t1 AS outr
WHERE outr.col_varchar_key IN (SELECT innr.col_varchar_key
@@ -6567,7 +6567,7 @@ id select_type table type possible_keys
1 PRIMARY grandparent2 ALL NULL NULL NULL NULL 1 Using where; Using join buffer (Block Nested Loop)
2 DEPENDENT SUBQUERY child1 ALL NULL NULL NULL NULL 15 Using where; Start materialize; Scan
2 DEPENDENT SUBQUERY child2 ALL NULL NULL NULL NULL 1 Using where; End materialize
-2 DEPENDENT SUBQUERY parent1 ref col_varchar_key col_varchar_key 4 test.child1.col_varchar_nokey 2 Using where; Using join buffer (Batch Key Access)
+2 DEPENDENT SUBQUERY parent1 ref col_varchar_key col_varchar_key 4 test.child1.col_varchar_nokey 2 Using where; Using join buffer (Batched Key Access)
SELECT grandparent1.col_varchar_nokey
FROM t1 AS grandparent1 LEFT JOIN t2 AS grandparent2 USING (col_varchar_nokey)
WHERE (grandparent1.col_varchar_key) IN
=== modified file 'mysql-test/r/subquery_sj_all_bka_nobnl.result'
--- a/mysql-test/r/subquery_sj_all_bka_nobnl.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_all_bka_nobnl.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
set optimizer_switch='semijoin=on,materialization=on,firstmatch=on,loosescan=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=off';
drop table if exists t0, t1, t2, t10, t11, t12;
create table t1 (a int not null, b int, primary key (a));
@@ -25,7 +25,7 @@ a
explain extended select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00 Using where; Using join buffer (Batch Key Access)
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00 Using where; Using join buffer (Batched Key Access)
Warnings:
Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`a` = `test`.`t2`.`a`) and (`test`.`t1`.`b` <> 30))
select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
@@ -35,7 +35,7 @@ a
explain extended select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 index PRIMARY PRIMARY 4 NULL 4 100.00 Using index
-1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00 Using where; Using join buffer (Batch Key Access)
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t2.a 1 100.00 Using where; Using join buffer (Batched Key Access)
1 PRIMARY t3 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 100.00 Using index
Warnings:
Note 1003 /* select#1 */ select `test`.`t2`.`a` AS `a` from `test`.`t1` join `test`.`t3` join `test`.`t2` where ((`test`.`t1`.`a` = `test`.`t2`.`a`) and (`test`.`t3`.`a` = `test`.`t1`.`b`))
@@ -152,7 +152,7 @@ flattening a nested subquery
explain select * from t1 where a in (select pk from t10 where t10.a in (select pk from t12));
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
-1 PRIMARY t10 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where; Using join buffer (Batch Key Access)
+1 PRIMARY t10 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where; Using join buffer (Batched Key Access)
1 PRIMARY t12 eq_ref PRIMARY PRIMARY 4 test.t10.a 1 Using index
select * from t1 where a in (select pk from t10 where t10.a in (select pk from t12));
a b
@@ -163,7 +163,7 @@ flattening subquery w/ several tables
explain extended select * from t1 where a in (select t10.pk from t10, t12 where t12.pk=t10.a);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 PRIMARY t10 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 100.00 Using where; Using join buffer (Batch Key Access)
+1 PRIMARY t10 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 100.00 Using where; Using join buffer (Batched Key Access)
1 PRIMARY t12 eq_ref PRIMARY PRIMARY 4 test.t10.a 1 100.00 Using index
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t10` join `test`.`t12` join `test`.`t1` where ((`test`.`t10`.`pk` = `test`.`t1`.`a`) and (`test`.`t12`.`pk` = `test`.`t10`.`a`))
@@ -3089,7 +3089,7 @@ insert into t3 select A.a + 10*B.a, 'fil
explain select * from t3 where a in (select a from t2) and (a > 5 or a < 10);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where; Start temporary
-1 PRIMARY t3 ref a a 5 test.t2.a 1 End temporary; Using join buffer (Batch Key Access)
+1 PRIMARY t3 ref a a 5 test.t2.a 1 End temporary; Using join buffer (Batched Key Access)
select * from t3 where a in (select a from t2);
a filler
1 filler
@@ -3135,7 +3135,7 @@ explain select * from t1, t3 where t3.a
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 10 Using where
1 PRIMARY t2 ALL NULL NULL NULL NULL 10 Using where; Materialize; Scan
-1 PRIMARY t3 ref a a 5 test.t2.a 10 Using join buffer (Batch Key Access)
+1 PRIMARY t3 ref a a 5 test.t2.a 10 Using join buffer (Batched Key Access)
explain select straight_join * from t1 A, t1 B where A.a in (select a from t2);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY A ALL NULL NULL NULL NULL 10 Using where
@@ -3164,13 +3164,13 @@ explain select * from t0, t3 where t3.a
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t0 system NULL NULL NULL NULL 1
1 PRIMARY t2 ALL NULL NULL NULL NULL 10 Using where; Materialize; Scan
-1 PRIMARY t3 ref a a 5 test.t2.a 10 Using join buffer (Batch Key Access)
+1 PRIMARY t3 ref a a 5 test.t2.a 10 Using join buffer (Batched Key Access)
create table t4 as select a as x, a as y from t1;
explain select * from t0, t3 where (t3.a, t3.b) in (select x,y from t4) and (t3.a < 10 or t3.a >30);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t0 system NULL NULL NULL NULL 1
1 PRIMARY t4 ALL NULL NULL NULL NULL 10 Using where; Materialize; Scan
-1 PRIMARY t3 ref a a 5 test.t4.x 10 Using where; Using join buffer (Batch Key Access)
+1 PRIMARY t3 ref a a 5 test.t4.x 10 Using where; Using join buffer (Batched Key Access)
drop table t0,t1,t2,t3,t4;
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
@@ -4047,7 +4047,7 @@ EXPLAIN EXTENDED SELECT vkey FROM t0 WHE
(SELECT t1.pk FROM t0 t1 JOIN t0 t2 ON t2.vkey = t1.vnokey);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t0 ALL PRIMARY NULL NULL NULL 5 100.00
-1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t0.pk 1 100.00 Using where; Using join buffer (Batch Key Access)
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t0.pk 1 100.00 Using where; Using join buffer (Batched Key Access)
1 PRIMARY t2 ref vkey vkey 4 test.t1.vnokey 2 100.00 Using index; FirstMatch(t1)
Warnings:
Note 1003 /* select#1 */ select `test`.`t0`.`vkey` AS `vkey` from `test`.`t0` `t1` semi join (`test`.`t0` `t2`) join `test`.`t0` where ((`test`.`t2`.`vkey` = `test`.`t1`.`vnokey`) and (`test`.`t1`.`pk` = `test`.`t0`.`pk`))
@@ -4767,7 +4767,7 @@ WHERE cona.postalStripped='T2H3B2'
);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY cona ALL NULL NULL NULL NULL 2 100.00 Using where; Start temporary
-1 PRIMARY c eq_ref PRIMARY PRIMARY 4 test.cona.idContact 1 100.00 Using where; Using join buffer (Batch Key Access)
+1 PRIMARY c eq_ref PRIMARY PRIMARY 4 test.cona.idContact 1 100.00 Using where; Using join buffer (Batched Key Access)
1 PRIMARY a eq_ref PRIMARY PRIMARY 4 test.c.idObj 1 100.00 Using index; End temporary
Warnings:
Note 1003 /* select#1 */ select `test`.`a`.`idIndividual` AS `idIndividual` from `test`.`t1` `a` semi join (`test`.`t3` `cona` join `test`.`t2` `c`) where ((`test`.`c`.`idContact` = `test`.`cona`.`idContact`) and (`test`.`a`.`idIndividual` = `test`.`c`.`idObj`) and (`test`.`cona`.`postalStripped` = 'T2H3B2'))
@@ -5237,7 +5237,7 @@ where t1.uid in (select t4.uid from t4,
and t2.uid=t1.fid;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t4 ALL NULL NULL NULL NULL 1 Start temporary
-1 PRIMARY t3 ref uid uid 5 const 1 Using where; Using join buffer (Batch Key Access)
+1 PRIMARY t3 ref uid uid 5 const 1 Using where; Using join buffer (Batched Key Access)
1 PRIMARY t2 ALL NULL NULL NULL NULL 2
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where; End temporary
select t2.uid from t2, t1
@@ -5318,8 +5318,8 @@ WHERE Language='English' AND Percentage
t2.Population > 100000);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 range Population,Country Population 4 NULL 1 Using index condition; Using MRR; Start temporary
-1 PRIMARY t2 eq_ref PRIMARY,Population PRIMARY 3 test.t1.Country 1 Using where; Using join buffer (Batch Key Access)
-1 PRIMARY t3 eq_ref PRIMARY,Percentage PRIMARY 33 test.t2.Code,const 1 Using index condition; Using where; End temporary; Using join buffer (Batch Key Access)
+1 PRIMARY t2 eq_ref PRIMARY,Population PRIMARY 3 test.t1.Country 1 Using where; Using join buffer (Batched Key Access)
+1 PRIMARY t3 eq_ref PRIMARY,Percentage PRIMARY 33 test.t2.Code,const 1 Using index condition; Using where; End temporary; Using join buffer (Batched Key Access)
DROP TABLE t1,t2,t3;
CREATE TABLE t1 (
Code char(3) NOT NULL DEFAULT '',
@@ -5377,8 +5377,8 @@ where t0.a in ( select t1.a from t1,t2 w
t1.b=t2.b);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t0 ALL NULL NULL NULL NULL 5 100.00 Using where; Start temporary
-1 PRIMARY t1 ref a a 5 test.t0.a 1 100.00 Using join buffer (Batch Key Access)
-1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 test.t0.a 1 100.00 Using where; End temporary; Using join buffer (Batch Key Access)
+1 PRIMARY t1 ref a a 5 test.t0.a 1 100.00 Using join buffer (Batched Key Access)
+1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 test.t0.a 1 100.00 Using where; End temporary; Using join buffer (Batched Key Access)
Warnings:
Note 1276 Field or reference 'test.t0.a' of SELECT #2 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t0`.`a` AS `a` from `test`.`t2` semi join (`test`.`t1`) join `test`.`t0` where ((`test`.`t2`.`b` = `test`.`t1`.`b`) and (`test`.`t1`.`a` = `test`.`t0`.`a`) and (`test`.`t2`.`a` = `test`.`t0`.`a`))
@@ -5862,7 +5862,7 @@ and t2.uid=t1.fid;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 ref uid uid 5 const 4 Using where; Start temporary
1 PRIMARY t4 eq_ref PRIMARY PRIMARY 4 test.t3.fid 1 Using index
-1 PRIMARY t1 ref uid uid 5 test.t4.uid 2 Using index condition; End temporary; Using join buffer (Batch Key Access)
+1 PRIMARY t1 ref uid uid 5 test.t4.uid 2 Using index condition; End temporary; Using join buffer (Batched Key Access)
1 PRIMARY t2 ALL PRIMARY NULL NULL NULL 9 Using where
select name from t2, t1
where t1.uid in (select t4.uid from t4, t3 where t3.uid=1 and t4.uid=t3.fid)
@@ -5921,7 +5921,7 @@ WHERE user_id = 'nicke'
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 system PRIMARY NULL NULL NULL 1
1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4
-1 PRIMARY t2 ref PRIMARY PRIMARY 4 test.t1.id 1 Using where; FirstMatch(t1); Using join buffer (Batch Key Access)
+1 PRIMARY t2 ref PRIMARY PRIMARY 4 test.t1.id 1 Using where; FirstMatch(t1); Using join buffer (Batched Key Access)
SELECT t1.partner_id
FROM t1
WHERE t1.id IN (
@@ -5949,12 +5949,12 @@ EXECUTE stmt;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 system PRIMARY NULL NULL NULL 1
1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4
-1 PRIMARY t2 ref PRIMARY PRIMARY 4 test.t1.id 1 Using where; FirstMatch(t1); Using join buffer (Batch Key Access)
+1 PRIMARY t2 ref PRIMARY PRIMARY 4 test.t1.id 1 Using where; FirstMatch(t1); Using join buffer (Batched Key Access)
EXECUTE stmt;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 system PRIMARY NULL NULL NULL 1
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 4
-1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.id 1 Using where; FirstMatch(t1); Using join buffer (Batch Key Access)
+1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.id 1 Using where; FirstMatch(t1); Using join buffer (Batched Key Access)
PREPARE stmt FROM
'SELECT t1.partner_id
FROM t1
@@ -6509,7 +6509,7 @@ AND outr.col_varchar_nokey < 't'
ORDER BY outr.col_varchar_key, outr.pk;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY innr index PRIMARY,col_varchar_key col_varchar_key 7 NULL 20 Using where; Using index; Using temporary; Using filesort; LooseScan
-1 PRIMARY outr ref col_varchar_key col_varchar_key 3 test.innr.col_varchar_key 1 Using where; Using join buffer (Batch Key Access)
+1 PRIMARY outr ref col_varchar_key col_varchar_key 3 test.innr.col_varchar_key 1 Using where; Using join buffer (Batched Key Access)
SELECT outr.col_varchar_key AS x, outr.pk AS y
FROM t1 AS outr
WHERE outr.col_varchar_key IN (SELECT innr.col_varchar_key
@@ -6567,7 +6567,7 @@ id select_type table type possible_keys
1 PRIMARY grandparent2 ALL NULL NULL NULL NULL 1 Using where
2 DEPENDENT SUBQUERY child1 ALL NULL NULL NULL NULL 15 Using where; Start materialize; Scan
2 DEPENDENT SUBQUERY child2 ALL NULL NULL NULL NULL 1 Using where; End materialize
-2 DEPENDENT SUBQUERY parent1 ref col_varchar_key col_varchar_key 4 test.child1.col_varchar_nokey 2 Using where; Using join buffer (Batch Key Access)
+2 DEPENDENT SUBQUERY parent1 ref col_varchar_key col_varchar_key 4 test.child1.col_varchar_nokey 2 Using where; Using join buffer (Batched Key Access)
SELECT grandparent1.col_varchar_nokey
FROM t1 AS grandparent1 LEFT JOIN t2 AS grandparent2 USING (col_varchar_nokey)
WHERE (grandparent1.col_varchar_key) IN
=== modified file 'mysql-test/r/subquery_sj_all_bkaunique.result'
--- a/mysql-test/r/subquery_sj_all_bkaunique.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_all_bkaunique.result 2011-09-07 10:21:50 +0000
@@ -1,5 +1,5 @@
SET debug= '+d,test_bka_unique';
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
set optimizer_switch='semijoin=on,materialization=on,firstmatch=on,loosescan=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=off';
drop table if exists t0, t1, t2, t10, t11, t12;
create table t1 (a int not null, b int, primary key (a));
@@ -153,7 +153,7 @@ flattening a nested subquery
explain select * from t1 where a in (select pk from t10 where t10.a in (select pk from t12));
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where
-1 PRIMARY t10 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where; Using join buffer (Batch Key Access (unique))
+1 PRIMARY t10 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 Using where; Using join buffer (Batched Key Access (unique))
1 PRIMARY t12 eq_ref PRIMARY PRIMARY 4 test.t10.a 1 Using index
select * from t1 where a in (select pk from t10 where t10.a in (select pk from t12));
a b
@@ -164,7 +164,7 @@ flattening subquery w/ several tables
explain extended select * from t1 where a in (select t10.pk from t10, t12 where t12.pk=t10.a);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
-1 PRIMARY t10 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 100.00 Using where; Using join buffer (Batch Key Access (unique))
+1 PRIMARY t10 eq_ref PRIMARY PRIMARY 4 test.t1.a 1 100.00 Using where; Using join buffer (Batched Key Access (unique))
1 PRIMARY t12 eq_ref PRIMARY PRIMARY 4 test.t10.a 1 100.00 Using index
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t10` join `test`.`t12` join `test`.`t1` where ((`test`.`t10`.`pk` = `test`.`t1`.`a`) and (`test`.`t12`.`pk` = `test`.`t10`.`a`))
@@ -3090,7 +3090,7 @@ insert into t3 select A.a + 10*B.a, 'fil
explain select * from t3 where a in (select a from t2) and (a > 5 or a < 10);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where; Start temporary
-1 PRIMARY t3 ref a a 5 test.t2.a 1 End temporary; Using join buffer (Batch Key Access (unique))
+1 PRIMARY t3 ref a a 5 test.t2.a 1 End temporary; Using join buffer (Batched Key Access (unique))
select * from t3 where a in (select a from t2);
a filler
1 filler
@@ -3136,7 +3136,7 @@ explain select * from t1, t3 where t3.a
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 10 Using where
1 PRIMARY t2 ALL NULL NULL NULL NULL 10 Using where; Materialize; Scan
-1 PRIMARY t3 ref a a 5 test.t2.a 10 Using join buffer (Batch Key Access (unique))
+1 PRIMARY t3 ref a a 5 test.t2.a 10 Using join buffer (Batched Key Access (unique))
explain select straight_join * from t1 A, t1 B where A.a in (select a from t2);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY A ALL NULL NULL NULL NULL 10 Using where
@@ -3165,13 +3165,13 @@ explain select * from t0, t3 where t3.a
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t0 system NULL NULL NULL NULL 1
1 PRIMARY t2 ALL NULL NULL NULL NULL 10 Using where; Materialize; Scan
-1 PRIMARY t3 ref a a 5 test.t2.a 10 Using join buffer (Batch Key Access (unique))
+1 PRIMARY t3 ref a a 5 test.t2.a 10 Using join buffer (Batched Key Access (unique))
create table t4 as select a as x, a as y from t1;
explain select * from t0, t3 where (t3.a, t3.b) in (select x,y from t4) and (t3.a < 10 or t3.a >30);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t0 system NULL NULL NULL NULL 1
1 PRIMARY t4 ALL NULL NULL NULL NULL 10 Using where; Materialize; Scan
-1 PRIMARY t3 ref a a 5 test.t4.x 10 Using where; Using join buffer (Batch Key Access (unique))
+1 PRIMARY t3 ref a a 5 test.t4.x 10 Using where; Using join buffer (Batched Key Access (unique))
drop table t0,t1,t2,t3,t4;
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
@@ -4048,7 +4048,7 @@ EXPLAIN EXTENDED SELECT vkey FROM t0 WHE
(SELECT t1.pk FROM t0 t1 JOIN t0 t2 ON t2.vkey = t1.vnokey);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t0 ALL PRIMARY NULL NULL NULL 5 100.00
-1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t0.pk 1 100.00 Using where; Using join buffer (Batch Key Access (unique))
+1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t0.pk 1 100.00 Using where; Using join buffer (Batched Key Access (unique))
1 PRIMARY t2 ref vkey vkey 4 test.t1.vnokey 2 100.00 Using index; FirstMatch(t1)
Warnings:
Note 1003 /* select#1 */ select `test`.`t0`.`vkey` AS `vkey` from `test`.`t0` `t1` semi join (`test`.`t0` `t2`) join `test`.`t0` where ((`test`.`t2`.`vkey` = `test`.`t1`.`vnokey`) and (`test`.`t1`.`pk` = `test`.`t0`.`pk`))
@@ -4768,7 +4768,7 @@ WHERE cona.postalStripped='T2H3B2'
);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY cona ALL NULL NULL NULL NULL 2 100.00 Using where; Start temporary
-1 PRIMARY c eq_ref PRIMARY PRIMARY 4 test.cona.idContact 1 100.00 Using where; Using join buffer (Batch Key Access (unique))
+1 PRIMARY c eq_ref PRIMARY PRIMARY 4 test.cona.idContact 1 100.00 Using where; Using join buffer (Batched Key Access (unique))
1 PRIMARY a eq_ref PRIMARY PRIMARY 4 test.c.idObj 1 100.00 Using index; End temporary
Warnings:
Note 1003 /* select#1 */ select `test`.`a`.`idIndividual` AS `idIndividual` from `test`.`t1` `a` semi join (`test`.`t3` `cona` join `test`.`t2` `c`) where ((`test`.`c`.`idContact` = `test`.`cona`.`idContact`) and (`test`.`a`.`idIndividual` = `test`.`c`.`idObj`) and (`test`.`cona`.`postalStripped` = 'T2H3B2'))
@@ -4873,7 +4873,7 @@ CREATE INDEX I2 ON t1 (b);
EXPLAIN SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index I1 I1 2 NULL 2 Using where; Using index; LooseScan
-1 PRIMARY t1 ref I2 I2 13 test.t1.a 2 Using index condition; Using join buffer (Batch Key Access (unique))
+1 PRIMARY t1 ref I2 I2 13 test.t1.a 2 Using index condition; Using join buffer (Batched Key Access (unique))
SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1);
a b
CREATE TABLE t2 (a VARCHAR(1), b VARCHAR(10));
@@ -4883,14 +4883,14 @@ CREATE INDEX I2 ON t2 (b);
EXPLAIN SELECT a,b FROM t2 WHERE b IN (SELECT a FROM t2);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 index I1 I1 4 NULL 2 Using where; Using index; LooseScan
-1 PRIMARY t2 ref I2 I2 13 test.t2.a 2 Using index condition; Using join buffer (Batch Key Access (unique))
+1 PRIMARY t2 ref I2 I2 13 test.t2.a 2 Using index condition; Using join buffer (Batched Key Access (unique))
SELECT a,b FROM t2 WHERE b IN (SELECT a FROM t2);
a b
EXPLAIN
SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1 WHERE LENGTH(a)<500);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index I1 I1 2 NULL 2 Using where; Using index; LooseScan
-1 PRIMARY t1 ref I2 I2 13 test.t1.a 2 Using index condition; Using join buffer (Batch Key Access (unique))
+1 PRIMARY t1 ref I2 I2 13 test.t1.a 2 Using index condition; Using join buffer (Batched Key Access (unique))
SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1 WHERE LENGTH(a)<500);
a b
DROP TABLE t1,t2;
@@ -5238,7 +5238,7 @@ where t1.uid in (select t4.uid from t4,
and t2.uid=t1.fid;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t4 ALL NULL NULL NULL NULL 1 Start temporary
-1 PRIMARY t3 ref uid uid 5 const 1 Using where; Using join buffer (Batch Key Access (unique))
+1 PRIMARY t3 ref uid uid 5 const 1 Using where; Using join buffer (Batched Key Access (unique))
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using join buffer (Block Nested Loop)
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where; End temporary; Using join buffer (Block Nested Loop)
select t2.uid from t2, t1
@@ -5319,8 +5319,8 @@ WHERE Language='English' AND Percentage
t2.Population > 100000);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 range Population,Country Population 4 NULL 1 Using index condition; Using MRR; Start temporary
-1 PRIMARY t2 eq_ref PRIMARY,Population PRIMARY 3 test.t1.Country 1 Using where; Using join buffer (Batch Key Access (unique))
-1 PRIMARY t3 eq_ref PRIMARY,Percentage PRIMARY 33 test.t2.Code,const 1 Using index condition; Using where; End temporary; Using join buffer (Batch Key Access (unique))
+1 PRIMARY t2 eq_ref PRIMARY,Population PRIMARY 3 test.t1.Country 1 Using where; Using join buffer (Batched Key Access (unique))
+1 PRIMARY t3 eq_ref PRIMARY,Percentage PRIMARY 33 test.t2.Code,const 1 Using index condition; Using where; End temporary; Using join buffer (Batched Key Access (unique))
DROP TABLE t1,t2,t3;
CREATE TABLE t1 (
Code char(3) NOT NULL DEFAULT '',
@@ -5378,8 +5378,8 @@ where t0.a in ( select t1.a from t1,t2 w
t1.b=t2.b);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t0 ALL NULL NULL NULL NULL 5 100.00 Using where; Start temporary
-1 PRIMARY t1 ref a a 5 test.t0.a 1 100.00 Using join buffer (Batch Key Access (unique))
-1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 test.t0.a 1 100.00 Using where; End temporary; Using join buffer (Batch Key Access (unique))
+1 PRIMARY t1 ref a a 5 test.t0.a 1 100.00 Using join buffer (Batched Key Access (unique))
+1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 test.t0.a 1 100.00 Using where; End temporary; Using join buffer (Batched Key Access (unique))
Warnings:
Note 1276 Field or reference 'test.t0.a' of SELECT #2 was resolved in SELECT #1
Note 1003 /* select#1 */ select `test`.`t0`.`a` AS `a` from `test`.`t2` semi join (`test`.`t1`) join `test`.`t0` where ((`test`.`t2`.`b` = `test`.`t1`.`b`) and (`test`.`t1`.`a` = `test`.`t0`.`a`) and (`test`.`t2`.`a` = `test`.`t0`.`a`))
@@ -5863,7 +5863,7 @@ and t2.uid=t1.fid;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 ref uid uid 5 const 4 Using where; Start temporary
1 PRIMARY t4 eq_ref PRIMARY PRIMARY 4 test.t3.fid 1 Using index
-1 PRIMARY t1 ref uid uid 5 test.t4.uid 2 Using index condition; End temporary; Using join buffer (Batch Key Access (unique))
+1 PRIMARY t1 ref uid uid 5 test.t4.uid 2 Using index condition; End temporary; Using join buffer (Batched Key Access (unique))
1 PRIMARY t2 ALL PRIMARY NULL NULL NULL 9 Using where; Using join buffer (Block Nested Loop)
select name from t2, t1
where t1.uid in (select t4.uid from t4, t3 where t3.uid=1 and t4.uid=t3.fid)
@@ -5922,7 +5922,7 @@ WHERE user_id = 'nicke'
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 system PRIMARY NULL NULL NULL 1
1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4
-1 PRIMARY t2 ref PRIMARY PRIMARY 4 test.t1.id 1 Using where; FirstMatch(t1); Using join buffer (Batch Key Access (unique))
+1 PRIMARY t2 ref PRIMARY PRIMARY 4 test.t1.id 1 Using where; FirstMatch(t1); Using join buffer (Batched Key Access (unique))
SELECT t1.partner_id
FROM t1
WHERE t1.id IN (
@@ -5950,12 +5950,12 @@ EXECUTE stmt;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 system PRIMARY NULL NULL NULL 1
1 PRIMARY t1 ALL PRIMARY NULL NULL NULL 4
-1 PRIMARY t2 ref PRIMARY PRIMARY 4 test.t1.id 1 Using where; FirstMatch(t1); Using join buffer (Batch Key Access (unique))
+1 PRIMARY t2 ref PRIMARY PRIMARY 4 test.t1.id 1 Using where; FirstMatch(t1); Using join buffer (Batched Key Access (unique))
EXECUTE stmt;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 system PRIMARY NULL NULL NULL 1
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 4
-1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.id 1 Using where; FirstMatch(t1); Using join buffer (Batch Key Access (unique))
+1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.id 1 Using where; FirstMatch(t1); Using join buffer (Batched Key Access (unique))
PREPARE stmt FROM
'SELECT t1.partner_id
FROM t1
@@ -6510,7 +6510,7 @@ AND outr.col_varchar_nokey < 't'
ORDER BY outr.col_varchar_key, outr.pk;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY innr index PRIMARY,col_varchar_key col_varchar_key 7 NULL 20 Using where; Using index; Using temporary; Using filesort; LooseScan
-1 PRIMARY outr ref col_varchar_key col_varchar_key 3 test.innr.col_varchar_key 1 Using where; Using join buffer (Batch Key Access (unique))
+1 PRIMARY outr ref col_varchar_key col_varchar_key 3 test.innr.col_varchar_key 1 Using where; Using join buffer (Batched Key Access (unique))
SELECT outr.col_varchar_key AS x, outr.pk AS y
FROM t1 AS outr
WHERE outr.col_varchar_key IN (SELECT innr.col_varchar_key
@@ -6568,7 +6568,7 @@ id select_type table type possible_keys
1 PRIMARY grandparent2 ALL NULL NULL NULL NULL 1 Using where; Using join buffer (Block Nested Loop)
2 DEPENDENT SUBQUERY child1 ALL NULL NULL NULL NULL 15 Using where; Start materialize; Scan
2 DEPENDENT SUBQUERY child2 ALL NULL NULL NULL NULL 1 Using where; End materialize
-2 DEPENDENT SUBQUERY parent1 ref col_varchar_key col_varchar_key 4 test.child1.col_varchar_nokey 2 Using where; Using join buffer (Batch Key Access (unique))
+2 DEPENDENT SUBQUERY parent1 ref col_varchar_key col_varchar_key 4 test.child1.col_varchar_nokey 2 Using where; Using join buffer (Batched Key Access (unique))
SELECT grandparent1.col_varchar_nokey
FROM t1 AS grandparent1 LEFT JOIN t2 AS grandparent2 USING (col_varchar_nokey)
WHERE (grandparent1.col_varchar_key) IN
=== modified file 'mysql-test/r/subquery_sj_dupsweed_bka.result'
--- a/mysql-test/r/subquery_sj_dupsweed_bka.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_dupsweed_bka.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
drop table if exists t0, t1, t2, t10, t11, t12;
create table t1 (a int not null, b int, primary key (a));
create table t2 (a int not null, primary key (a));
=== modified file 'mysql-test/r/subquery_sj_dupsweed_bka_nobnl.result'
--- a/mysql-test/r/subquery_sj_dupsweed_bka_nobnl.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_dupsweed_bka_nobnl.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
drop table if exists t0, t1, t2, t10, t11, t12;
create table t1 (a int not null, b int, primary key (a));
create table t2 (a int not null, primary key (a));
=== modified file 'mysql-test/r/subquery_sj_dupsweed_bkaunique.result'
--- a/mysql-test/r/subquery_sj_dupsweed_bkaunique.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_dupsweed_bkaunique.result 2011-09-07 10:21:50 +0000
@@ -1,5 +1,5 @@
SET debug= '+d,test_bka_unique';
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
drop table if exists t0, t1, t2, t10, t11, t12;
create table t1 (a int not null, b int, primary key (a));
create table t2 (a int not null, primary key (a));
=== modified file 'mysql-test/r/subquery_sj_firstmatch.result'
--- a/mysql-test/r/subquery_sj_firstmatch.result 2011-08-03 11:29:20 +0000
+++ b/mysql-test/r/subquery_sj_firstmatch.result 2011-09-07 10:21:50 +0000
@@ -6601,7 +6601,7 @@ DROP TABLE t1, t2;
# certain query plans
#
SET @@default_storage_engine='innodb';
-SET @@optimizer_switch='semijoin=on,materialization=off,firstmatch=on,loosescan=off,block_nested_loop=off,batch_key_access=off';
+SET @@optimizer_switch='semijoin=on,materialization=off,firstmatch=on,loosescan=off,block_nested_loop=off,batched_key_access=off';
CREATE TABLE t0(a INTEGER);
CREATE TABLE t1(a INTEGER);
INSERT INTO t1 VALUES(1);
=== modified file 'mysql-test/r/subquery_sj_firstmatch_bka.result'
--- a/mysql-test/r/subquery_sj_firstmatch_bka.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_firstmatch_bka.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
set optimizer_switch='semijoin=on,firstmatch=on';
drop table if exists t0, t1, t2, t10, t11, t12;
create table t1 (a int not null, b int, primary key (a));
@@ -6602,7 +6602,7 @@ DROP TABLE t1, t2;
# certain query plans
#
SET @@default_storage_engine='innodb';
-SET @@optimizer_switch='semijoin=on,materialization=off,firstmatch=on,loosescan=off,block_nested_loop=off,batch_key_access=off';
+SET @@optimizer_switch='semijoin=on,materialization=off,firstmatch=on,loosescan=off,block_nested_loop=off,batched_key_access=off';
CREATE TABLE t0(a INTEGER);
CREATE TABLE t1(a INTEGER);
INSERT INTO t1 VALUES(1);
=== modified file 'mysql-test/r/subquery_sj_firstmatch_bka_nobnl.result'
--- a/mysql-test/r/subquery_sj_firstmatch_bka_nobnl.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_firstmatch_bka_nobnl.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
set optimizer_switch='semijoin=on,firstmatch=on';
drop table if exists t0, t1, t2, t10, t11, t12;
create table t1 (a int not null, b int, primary key (a));
@@ -6602,7 +6602,7 @@ DROP TABLE t1, t2;
# certain query plans
#
SET @@default_storage_engine='innodb';
-SET @@optimizer_switch='semijoin=on,materialization=off,firstmatch=on,loosescan=off,block_nested_loop=off,batch_key_access=off';
+SET @@optimizer_switch='semijoin=on,materialization=off,firstmatch=on,loosescan=off,block_nested_loop=off,batched_key_access=off';
CREATE TABLE t0(a INTEGER);
CREATE TABLE t1(a INTEGER);
INSERT INTO t1 VALUES(1);
=== modified file 'mysql-test/r/subquery_sj_firstmatch_bkaunique.result'
--- a/mysql-test/r/subquery_sj_firstmatch_bkaunique.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_firstmatch_bkaunique.result 2011-09-07 10:21:50 +0000
@@ -1,5 +1,5 @@
SET debug= '+d,test_bka_unique';
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
set optimizer_switch='semijoin=on,firstmatch=on';
drop table if exists t0, t1, t2, t10, t11, t12;
create table t1 (a int not null, b int, primary key (a));
@@ -6603,7 +6603,7 @@ DROP TABLE t1, t2;
# certain query plans
#
SET @@default_storage_engine='innodb';
-SET @@optimizer_switch='semijoin=on,materialization=off,firstmatch=on,loosescan=off,block_nested_loop=off,batch_key_access=off';
+SET @@optimizer_switch='semijoin=on,materialization=off,firstmatch=on,loosescan=off,block_nested_loop=off,batched_key_access=off';
CREATE TABLE t0(a INTEGER);
CREATE TABLE t1(a INTEGER);
INSERT INTO t1 VALUES(1);
=== modified file 'mysql-test/r/subquery_sj_innodb_all_bka.result'
--- a/mysql-test/r/subquery_sj_innodb_all_bka.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_innodb_all_bka.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
set optimizer_switch='semijoin=on,materialization=on,firstmatch=on,loosescan=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=off';
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
@@ -33,7 +33,7 @@ a b
explain select * from t2 where b in (select a from t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where; Start temporary
-1 PRIMARY t2 ref b b 5 test.t1.a 1 End temporary; Using join buffer (Batch Key Access)
+1 PRIMARY t2 ref b b 5 test.t1.a 1 End temporary; Using join buffer (Batched Key Access)
select * from t2 where b in (select a from t1);
a b
1 1
@@ -51,7 +51,7 @@ insert into t3 select a,a, a,a,a from t0
explain select * from t3 where b in (select a from t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where; Start temporary
-1 PRIMARY t3 ref b b 5 test.t1.a 1 End temporary; Using join buffer (Batch Key Access)
+1 PRIMARY t3 ref b b 5 test.t1.a 1 End temporary; Using join buffer (Batched Key Access)
select * from t3 where b in (select a from t1);
a b pk1 pk2 pk3
1 1 1 1 1
=== modified file 'mysql-test/r/subquery_sj_innodb_all_bka_nobnl.result'
--- a/mysql-test/r/subquery_sj_innodb_all_bka_nobnl.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_innodb_all_bka_nobnl.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
set optimizer_switch='semijoin=on,materialization=on,firstmatch=on,loosescan=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=off';
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
@@ -33,7 +33,7 @@ a b
explain select * from t2 where b in (select a from t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where; Start temporary
-1 PRIMARY t2 ref b b 5 test.t1.a 1 End temporary; Using join buffer (Batch Key Access)
+1 PRIMARY t2 ref b b 5 test.t1.a 1 End temporary; Using join buffer (Batched Key Access)
select * from t2 where b in (select a from t1);
a b
1 1
@@ -51,7 +51,7 @@ insert into t3 select a,a, a,a,a from t0
explain select * from t3 where b in (select a from t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where; Start temporary
-1 PRIMARY t3 ref b b 5 test.t1.a 1 End temporary; Using join buffer (Batch Key Access)
+1 PRIMARY t3 ref b b 5 test.t1.a 1 End temporary; Using join buffer (Batched Key Access)
select * from t3 where b in (select a from t1);
a b pk1 pk2 pk3
1 1 1 1 1
=== modified file 'mysql-test/r/subquery_sj_innodb_all_bkaunique.result'
--- a/mysql-test/r/subquery_sj_innodb_all_bkaunique.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_innodb_all_bkaunique.result 2011-09-07 10:21:50 +0000
@@ -1,5 +1,5 @@
SET debug= '+d,test_bka_unique';
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
set optimizer_switch='semijoin=on,materialization=on,firstmatch=on,loosescan=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=off';
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
@@ -34,7 +34,7 @@ a b
explain select * from t2 where b in (select a from t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where; Start temporary
-1 PRIMARY t2 ref b b 5 test.t1.a 1 End temporary; Using join buffer (Batch Key Access (unique))
+1 PRIMARY t2 ref b b 5 test.t1.a 1 End temporary; Using join buffer (Batched Key Access (unique))
select * from t2 where b in (select a from t1);
a b
1 1
@@ -52,7 +52,7 @@ insert into t3 select a,a, a,a,a from t0
explain select * from t3 where b in (select a from t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Using where; Start temporary
-1 PRIMARY t3 ref b b 5 test.t1.a 1 End temporary; Using join buffer (Batch Key Access (unique))
+1 PRIMARY t3 ref b b 5 test.t1.a 1 End temporary; Using join buffer (Batched Key Access (unique))
select * from t3 where b in (select a from t1);
a b pk1 pk2 pk3
1 1 1 1 1
=== modified file 'mysql-test/r/subquery_sj_innodb_none_bka.result'
--- a/mysql-test/r/subquery_sj_innodb_none_bka.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_innodb_none_bka.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1 (
=== modified file 'mysql-test/r/subquery_sj_innodb_none_bka_nobnl.result'
--- a/mysql-test/r/subquery_sj_innodb_none_bka_nobnl.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_innodb_none_bka_nobnl.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1 (
=== modified file 'mysql-test/r/subquery_sj_innodb_none_bkaunique.result'
--- a/mysql-test/r/subquery_sj_innodb_none_bkaunique.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_innodb_none_bkaunique.result 2011-09-07 10:21:50 +0000
@@ -1,5 +1,5 @@
SET debug= '+d,test_bka_unique';
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
create table t0 (a int);
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1 (
=== modified file 'mysql-test/r/subquery_sj_loosescan_bka.result'
--- a/mysql-test/r/subquery_sj_loosescan_bka.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_loosescan_bka.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
set optimizer_switch='semijoin=on,loosescan=on';
drop table if exists t0, t1, t2, t10, t11, t12;
create table t1 (a int not null, b int, primary key (a));
=== modified file 'mysql-test/r/subquery_sj_loosescan_bka_nobnl.result'
--- a/mysql-test/r/subquery_sj_loosescan_bka_nobnl.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_loosescan_bka_nobnl.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
set optimizer_switch='semijoin=on,loosescan=on';
drop table if exists t0, t1, t2, t10, t11, t12;
create table t1 (a int not null, b int, primary key (a));
=== modified file 'mysql-test/r/subquery_sj_loosescan_bkaunique.result'
--- a/mysql-test/r/subquery_sj_loosescan_bkaunique.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_loosescan_bkaunique.result 2011-09-07 10:21:50 +0000
@@ -1,5 +1,5 @@
SET debug= '+d,test_bka_unique';
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
set optimizer_switch='semijoin=on,loosescan=on';
drop table if exists t0, t1, t2, t10, t11, t12;
create table t1 (a int not null, b int, primary key (a));
=== modified file 'mysql-test/r/subquery_sj_mat_bka.result'
--- a/mysql-test/r/subquery_sj_mat_bka.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_mat_bka.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
set optimizer_switch='semijoin=on,materialization=on';
drop table if exists t0, t1, t2, t10, t11, t12;
create table t1 (a int not null, b int, primary key (a));
=== modified file 'mysql-test/r/subquery_sj_mat_bka_nobnl.result'
--- a/mysql-test/r/subquery_sj_mat_bka_nobnl.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_mat_bka_nobnl.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
set optimizer_switch='semijoin=on,materialization=on';
drop table if exists t0, t1, t2, t10, t11, t12;
create table t1 (a int not null, b int, primary key (a));
=== modified file 'mysql-test/r/subquery_sj_mat_bkaunique.result'
--- a/mysql-test/r/subquery_sj_mat_bkaunique.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_mat_bkaunique.result 2011-09-07 10:21:50 +0000
@@ -1,5 +1,5 @@
SET debug= '+d,test_bka_unique';
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
set optimizer_switch='semijoin=on,materialization=on';
drop table if exists t0, t1, t2, t10, t11, t12;
create table t1 (a int not null, b int, primary key (a));
=== modified file 'mysql-test/r/subquery_sj_none_bka.result'
--- a/mysql-test/r/subquery_sj_none_bka.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_none_bka.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
drop table if exists t0, t1, t2, t10, t11, t12;
create table t1 (a int not null, b int, primary key (a));
create table t2 (a int not null, primary key (a));
=== modified file 'mysql-test/r/subquery_sj_none_bka_nobnl.result'
--- a/mysql-test/r/subquery_sj_none_bka_nobnl.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_none_bka_nobnl.result 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
drop table if exists t0, t1, t2, t10, t11, t12;
create table t1 (a int not null, b int, primary key (a));
create table t2 (a int not null, primary key (a));
=== modified file 'mysql-test/r/subquery_sj_none_bkaunique.result'
--- a/mysql-test/r/subquery_sj_none_bkaunique.result 2011-08-18 09:21:45 +0000
+++ b/mysql-test/r/subquery_sj_none_bkaunique.result 2011-09-07 10:21:50 +0000
@@ -1,5 +1,5 @@
SET debug= '+d,test_bka_unique';
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
drop table if exists t0, t1, t2, t10, t11, t12;
create table t1 (a int not null, b int, primary key (a));
create table t2 (a int not null, primary key (a));
=== modified file 'mysql-test/suite/sys_vars/r/optimizer_switch_basic.result'
--- a/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result 2011-08-17 11:50:34 +0000
+++ b/mysql-test/suite/sys_vars/r/optimizer_switch_basic.result 2011-09-07 10:21:50 +0000
@@ -1,57 +1,57 @@
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,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off
select @@global.optimizer_switch;
@@global.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=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,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off
+optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=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,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off
+optimizer_switch index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=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,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off
+OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=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,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off
+OPTIMIZER_SWITCH index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=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,engine_condition_pushdown=off,index_condition_pushdown=off,mrr=off,mrr_cost_based=off,block_nested_loop=off,batch_key_access=off
+index_merge=off,index_merge_union=on,index_merge_sort_union=off,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=off,mrr=off,mrr_cost_based=off,block_nested_loop=off,batched_key_access=off
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,mrr=off,mrr_cost_based=off,block_nested_loop=off,batch_key_access=off
+index_merge=on,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,mrr=off,mrr_cost_based=off,block_nested_loop=off,batched_key_access=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,engine_condition_pushdown=off,index_condition_pushdown=off,mrr=off,mrr_cost_based=off,block_nested_loop=off,batch_key_access=off
+index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=off,mrr=off,mrr_cost_based=off,block_nested_loop=off,batched_key_access=off
select @@session.optimizer_switch;
@@session.optimizer_switch
-index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,mrr=off,mrr_cost_based=off,block_nested_loop=off,batch_key_access=off
+index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,mrr=off,mrr_cost_based=off,block_nested_loop=off,batched_key_access=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,engine_condition_pushdown=off,index_condition_pushdown=off,mrr=off,mrr_cost_based=off,block_nested_loop=off,batch_key_access=off
+optimizer_switch index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=off,mrr=off,mrr_cost_based=off,block_nested_loop=off,batched_key_access=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,engine_condition_pushdown=off,index_condition_pushdown=off,mrr=off,mrr_cost_based=off,block_nested_loop=off,batch_key_access=off
+optimizer_switch index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,mrr=off,mrr_cost_based=off,block_nested_loop=off,batched_key_access=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,engine_condition_pushdown=off,index_condition_pushdown=off,mrr=off,mrr_cost_based=off,block_nested_loop=off,batch_key_access=off
+OPTIMIZER_SWITCH index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=off,mrr=off,mrr_cost_based=off,block_nested_loop=off,batched_key_access=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,engine_condition_pushdown=off,index_condition_pushdown=off,mrr=off,mrr_cost_based=off,block_nested_loop=off,batch_key_access=off
+OPTIMIZER_SWITCH index_merge=off,index_merge_union=off,index_merge_sort_union=on,index_merge_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,mrr=off,mrr_cost_based=off,block_nested_loop=off,batched_key_access=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,engine_condition_pushdown=off,index_condition_pushdown=off,mrr=off,mrr_cost_based=off,block_nested_loop=off,batch_key_access=off
+index_merge=off,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=off,index_condition_pushdown=off,mrr=off,mrr_cost_based=off,block_nested_loop=off,batched_key_access=off
set global optimizer_switch=1.1;
ERROR 42000: Incorrect argument type to variable 'optimizer_switch'
set global optimizer_switch=1e1;
@@ -70,4 +70,4 @@ ERROR 42000: Variable 'optimizer_switch'
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,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batch_key_access=off
+index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off
=== modified file 'mysql-test/t/join_cache_bka.test'
--- a/mysql-test/t/join_cache_bka.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/join_cache_bka.test 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source include/join_cache.inc
=== modified file 'mysql-test/t/join_cache_bka_nobnl.test'
--- a/mysql-test/t/join_cache_bka_nobnl.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/join_cache_bka_nobnl.test 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
--source include/join_cache.inc
=== modified file 'mysql-test/t/join_cache_bkaunique.test'
--- a/mysql-test/t/join_cache_bkaunique.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/join_cache_bkaunique.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
--source include/have_debug.inc
SET debug= '+d,test_bka_unique';
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source include/join_cache.inc
=== modified file 'mysql-test/t/join_cache_nojb.test'
--- a/mysql-test/t/join_cache_nojb.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/join_cache_nojb.test 2011-09-07 10:21:50 +0000
@@ -1,4 +1,4 @@
-set optimizer_switch='block_nested_loop=off,batch_key_access=off';
+set optimizer_switch='block_nested_loop=off,batched_key_access=off';
if (`select locate('mrr_cost_based', @@optimizer_switch) > 0`)
{
=== modified file 'mysql-test/t/join_nested_bka.test'
--- a/mysql-test/t/join_nested_bka.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/join_nested_bka.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run join_nested.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/join_nested.test
=== modified file 'mysql-test/t/join_nested_bka_nobnl.test'
--- a/mysql-test/t/join_nested_bka_nobnl.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/join_nested_bka_nobnl.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run join_nested.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
--source t/join_nested.test
=== modified file 'mysql-test/t/join_outer_bka.test'
--- a/mysql-test/t/join_outer_bka.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/join_outer_bka.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run join_outer.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/join_outer.test
=== modified file 'mysql-test/t/join_outer_bka_nobnl.test'
--- a/mysql-test/t/join_outer_bka_nobnl.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/join_outer_bka_nobnl.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run join_outer.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
--source t/join_outer.test
=== modified file 'mysql-test/t/select_all_bka.test'
--- a/mysql-test/t/select_all_bka.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/select_all_bka.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run select_all.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/select_all.test
=== modified file 'mysql-test/t/select_all_bka_nobnl.test'
--- a/mysql-test/t/select_all_bka_nobnl.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/select_all_bka_nobnl.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run select_all.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
--source t/select_all.test
=== modified file 'mysql-test/t/select_icp_mrr_bka.test'
--- a/mysql-test/t/select_icp_mrr_bka.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/select_icp_mrr_bka.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run select_icp_mrr.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/select_icp_mrr.test
=== modified file 'mysql-test/t/select_icp_mrr_bka_nobnl.test'
--- a/mysql-test/t/select_icp_mrr_bka_nobnl.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/select_icp_mrr_bka_nobnl.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run select_icp_mrr.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
--source t/select_icp_mrr.test
=== modified file 'mysql-test/t/select_none_bka.test'
--- a/mysql-test/t/select_none_bka.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/select_none_bka.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run select_none.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/select_none.test
=== modified file 'mysql-test/t/select_none_bka_nobnl.test'
--- a/mysql-test/t/select_none_bka_nobnl.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/select_none_bka_nobnl.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run select_none.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
--source t/select_none.test
=== modified file 'mysql-test/t/subquery_all_bka.test'
--- a/mysql-test/t/subquery_all_bka.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_all_bka.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_all.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/subquery_all.test
=== modified file 'mysql-test/t/subquery_all_bka_nobnl.test'
--- a/mysql-test/t/subquery_all_bka_nobnl.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_all_bka_nobnl.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_all.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
--source t/subquery_all.test
=== modified file 'mysql-test/t/subquery_nomat_nosj_bka.test'
--- a/mysql-test/t/subquery_nomat_nosj_bka.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_nomat_nosj_bka.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_nomat_nosj.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/subquery_nomat_nosj.test
=== modified file 'mysql-test/t/subquery_nomat_nosj_bka_nobnl.test'
--- a/mysql-test/t/subquery_nomat_nosj_bka_nobnl.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_nomat_nosj_bka_nobnl.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_nomat_nosj.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
--source t/subquery_nomat_nosj.test
=== modified file 'mysql-test/t/subquery_none_bka.test'
--- a/mysql-test/t/subquery_none_bka.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_none_bka.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_none.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/subquery_none.test
=== modified file 'mysql-test/t/subquery_none_bka_nobnl.test'
--- a/mysql-test/t/subquery_none_bka_nobnl.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_none_bka_nobnl.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_none.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
--source t/subquery_none.test
=== modified file 'mysql-test/t/subquery_sj_all_bka.test'
--- a/mysql-test/t/subquery_sj_all_bka.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_all_bka.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_sj_all.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/subquery_sj_all.test
=== modified file 'mysql-test/t/subquery_sj_all_bka_nobnl.test'
--- a/mysql-test/t/subquery_sj_all_bka_nobnl.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_all_bka_nobnl.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_sj_all.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
--source t/subquery_sj_all.test
=== modified file 'mysql-test/t/subquery_sj_all_bkaunique.test'
--- a/mysql-test/t/subquery_sj_all_bkaunique.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_all_bkaunique.test 2011-09-07 10:21:50 +0000
@@ -4,7 +4,7 @@
--source include/have_debug.inc
SET debug= '+d,test_bka_unique';
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/subquery_sj_all.test
=== modified file 'mysql-test/t/subquery_sj_dupsweed_bka.test'
--- a/mysql-test/t/subquery_sj_dupsweed_bka.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_dupsweed_bka.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_sj_dupsweed.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/subquery_sj_dupsweed.test
=== modified file 'mysql-test/t/subquery_sj_dupsweed_bka_nobnl.test'
--- a/mysql-test/t/subquery_sj_dupsweed_bka_nobnl.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_dupsweed_bka_nobnl.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_sj_dupsweed.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
--source t/subquery_sj_dupsweed.test
=== modified file 'mysql-test/t/subquery_sj_dupsweed_bkaunique.test'
--- a/mysql-test/t/subquery_sj_dupsweed_bkaunique.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_dupsweed_bkaunique.test 2011-09-07 10:21:50 +0000
@@ -4,7 +4,7 @@
--source include/have_debug.inc
SET debug= '+d,test_bka_unique';
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/subquery_sj_dupsweed.test
=== modified file 'mysql-test/t/subquery_sj_firstmatch.test'
--- a/mysql-test/t/subquery_sj_firstmatch.test 2011-07-06 13:45:37 +0000
+++ b/mysql-test/t/subquery_sj_firstmatch.test 2011-09-07 10:21:50 +0000
@@ -33,7 +33,7 @@ if (`select locate('mrr', @@optimizer_sw
--echo #
SET @@default_storage_engine='innodb';
-SET @@optimizer_switch='semijoin=on,materialization=off,firstmatch=on,loosescan=off,block_nested_loop=off,batch_key_access=off';
+SET @@optimizer_switch='semijoin=on,materialization=off,firstmatch=on,loosescan=off,block_nested_loop=off,batched_key_access=off';
CREATE TABLE t0(a INTEGER);
=== modified file 'mysql-test/t/subquery_sj_firstmatch_bka.test'
--- a/mysql-test/t/subquery_sj_firstmatch_bka.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_firstmatch_bka.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_sj_firstmatch.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/subquery_sj_firstmatch.test
=== modified file 'mysql-test/t/subquery_sj_firstmatch_bka_nobnl.test'
--- a/mysql-test/t/subquery_sj_firstmatch_bka_nobnl.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_firstmatch_bka_nobnl.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_sj_firstmatch.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
--source t/subquery_sj_firstmatch.test
=== modified file 'mysql-test/t/subquery_sj_firstmatch_bkaunique.test'
--- a/mysql-test/t/subquery_sj_firstmatch_bkaunique.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_firstmatch_bkaunique.test 2011-09-07 10:21:50 +0000
@@ -4,7 +4,7 @@
--source include/have_debug.inc
SET debug= '+d,test_bka_unique';
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/subquery_sj_firstmatch.test
=== modified file 'mysql-test/t/subquery_sj_innodb_all_bka.test'
--- a/mysql-test/t/subquery_sj_innodb_all_bka.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_innodb_all_bka.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_sj_innodb_all.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/subquery_sj_innodb_all.test
=== modified file 'mysql-test/t/subquery_sj_innodb_all_bka_nobnl.test'
--- a/mysql-test/t/subquery_sj_innodb_all_bka_nobnl.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_innodb_all_bka_nobnl.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_sj_innodb_all.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
--source t/subquery_sj_innodb_all.test
=== modified file 'mysql-test/t/subquery_sj_innodb_all_bkaunique.test'
--- a/mysql-test/t/subquery_sj_innodb_all_bkaunique.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_innodb_all_bkaunique.test 2011-09-07 10:21:50 +0000
@@ -4,7 +4,7 @@
--source include/have_debug.inc
SET debug= '+d,test_bka_unique';
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/subquery_sj_innodb_all.test
=== modified file 'mysql-test/t/subquery_sj_innodb_none_bka.test'
--- a/mysql-test/t/subquery_sj_innodb_none_bka.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_innodb_none_bka.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_sj_innodb_none.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/subquery_sj_innodb_none.test
=== modified file 'mysql-test/t/subquery_sj_innodb_none_bka_nobnl.test'
--- a/mysql-test/t/subquery_sj_innodb_none_bka_nobnl.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_innodb_none_bka_nobnl.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_sj_innodb_none.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
--source t/subquery_sj_innodb_none.test
=== modified file 'mysql-test/t/subquery_sj_innodb_none_bkaunique.test'
--- a/mysql-test/t/subquery_sj_innodb_none_bkaunique.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_innodb_none_bkaunique.test 2011-09-07 10:21:50 +0000
@@ -4,7 +4,7 @@
--source include/have_debug.inc
SET debug= '+d,test_bka_unique';
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/subquery_sj_innodb_none.test
=== modified file 'mysql-test/t/subquery_sj_loosescan_bka.test'
--- a/mysql-test/t/subquery_sj_loosescan_bka.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_loosescan_bka.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_sj_loosescan.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/subquery_sj_loosescan.test
=== modified file 'mysql-test/t/subquery_sj_loosescan_bka_nobnl.test'
--- a/mysql-test/t/subquery_sj_loosescan_bka_nobnl.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_loosescan_bka_nobnl.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_sj_loosescan.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
--source t/subquery_sj_loosescan.test
=== modified file 'mysql-test/t/subquery_sj_loosescan_bkaunique.test'
--- a/mysql-test/t/subquery_sj_loosescan_bkaunique.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_loosescan_bkaunique.test 2011-09-07 10:21:50 +0000
@@ -4,7 +4,7 @@
--source include/have_debug.inc
SET debug= '+d,test_bka_unique';
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/subquery_sj_loosescan.test
=== modified file 'mysql-test/t/subquery_sj_mat_bka.test'
--- a/mysql-test/t/subquery_sj_mat_bka.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_mat_bka.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_sj_mat.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/subquery_sj_mat.test
=== modified file 'mysql-test/t/subquery_sj_mat_bka_nobnl.test'
--- a/mysql-test/t/subquery_sj_mat_bka_nobnl.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_mat_bka_nobnl.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_sj_mat.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
--source t/subquery_sj_mat.test
=== modified file 'mysql-test/t/subquery_sj_mat_bkaunique.test'
--- a/mysql-test/t/subquery_sj_mat_bkaunique.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_mat_bkaunique.test 2011-09-07 10:21:50 +0000
@@ -4,7 +4,7 @@
--source include/have_debug.inc
SET debug= '+d,test_bka_unique';
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/subquery_sj_mat.test
=== modified file 'mysql-test/t/subquery_sj_none_bka.test'
--- a/mysql-test/t/subquery_sj_none_bka.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_none_bka.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_sj_none.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/subquery_sj_none.test
=== modified file 'mysql-test/t/subquery_sj_none_bka_nobnl.test'
--- a/mysql-test/t/subquery_sj_none_bka_nobnl.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_none_bka_nobnl.test 2011-09-07 10:21:50 +0000
@@ -1,7 +1,7 @@
#
# Run subquery_sj_none.test with BKA enabled
#
-set optimizer_switch='batch_key_access=on,block_nested_loop=off,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
--source t/subquery_sj_none.test
=== modified file 'mysql-test/t/subquery_sj_none_bkaunique.test'
--- a/mysql-test/t/subquery_sj_none_bkaunique.test 2011-08-18 09:21:45 +0000
+++ b/mysql-test/t/subquery_sj_none_bkaunique.test 2011-09-07 10:21:50 +0000
@@ -4,7 +4,7 @@
--source include/have_debug.inc
SET debug= '+d,test_bka_unique';
-set optimizer_switch='batch_key_access=on,mrr_cost_based=off';
+set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
--source t/subquery_sj_none.test
=== modified file 'sql/opt_explain.cc'
--- a/sql/opt_explain.cc 2011-08-19 11:39:15 +0000
+++ b/sql/opt_explain.cc 2011-09-07 10:21:50 +0000
@@ -1072,9 +1072,9 @@ bool Explain_join::explain_extra()
if ((tab->use_join_cache & JOIN_CACHE::ALG_BNL))
str_extra.append(STRING_WITH_LEN("Block Nested Loop)"));
else if ((tab->use_join_cache & JOIN_CACHE::ALG_BKA))
- str_extra.append(STRING_WITH_LEN("Batch Key Access)"));
+ str_extra.append(STRING_WITH_LEN("Batched Key Access)"));
else if ((tab->use_join_cache & JOIN_CACHE::ALG_BKA_UNIQUE))
- str_extra.append(STRING_WITH_LEN("Batch Key Access (unique))"));
+ str_extra.append(STRING_WITH_LEN("Batched Key Access (unique))"));
else
DBUG_ASSERT(0); /* purecov: inspected */
}
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc 2011-08-31 16:48:23 +0000
+++ b/sql/sql_select.cc 2011-09-07 10:21:50 +0000
@@ -11675,7 +11675,7 @@ void revise_cache_usage(JOIN_TAB *join_t
for any join operation (inner join, outer join, semi-join) with 'JT_ALL'
access method. In that case, a JOIN_CACHE_BNL object is always employed.
- If an index is used to access rows of the joined table and batch_key_access
+ If an index is used to access rows of the joined table and batched_key_access
is on, then a JOIN_CACHE_BKA object is employed. (Unless debug flag,
test_bka unique, is set, then a JOIN_CACHE_BKA_UNIQUE object is employed
instead.)
=== modified file 'sql/sys_vars.cc'
--- a/sql/sys_vars.cc 2011-08-20 00:25:14 +0000
+++ b/sql/sys_vars.cc 2011-09-07 10:21:50 +0000
@@ -1663,7 +1663,7 @@ static const char *optimizer_switch_name
"index_merge", "index_merge_union", "index_merge_sort_union",
"index_merge_intersection", "engine_condition_pushdown",
"index_condition_pushdown" , "mrr", "mrr_cost_based",
- "block_nested_loop", "batch_key_access",
+ "block_nested_loop", "batched_key_access",
#ifdef OPTIMIZER_SWITCH_ALL
"materialization", "semijoin", "loosescan", "firstmatch",
#endif
@@ -1689,7 +1689,7 @@ static Sys_var_flagset Sys_optimizer_swi
", materialization, "
"semijoin, loosescan, firstmatch"
#endif
- ", block_nested_loop, batch_key_access"
+ ", block_nested_loop, batched_key_access"
"} and val is one of {on, off, default}",
SESSION_VAR(optimizer_switch), CMD_LINE(REQUIRED_ARG),
optimizer_switch_names, DEFAULT(OPTIMIZER_SWITCH_DEFAULT),
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk branch (oystein.grovlen:3404 to 3405) WL#5285 | Oystein Grovlen | 9 Sep |