diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2014-12-06 01:11:22 +0300 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2014-12-06 01:11:22 +0300 |
commit | 9cac7649eade35f2e5a52e4107067701de315abc (patch) | |
tree | dd52931aa97a38f68e29eddd2a82fbf279c8fb4c /mysql-test/t/explain_json.test | |
parent | 8fb2c80fdb9868b45ab91c915b32d2c39fd7fcd0 (diff) | |
download | mariadb-git-9cac7649eade35f2e5a52e4107067701de315abc.tar.gz |
EXPLAIN FORMAT=JSON: Support range+MRR plans (when MRR is used but BKA is not)
Diffstat (limited to 'mysql-test/t/explain_json.test')
-rw-r--r-- | mysql-test/t/explain_json.test | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/explain_json.test b/mysql-test/t/explain_json.test index 20c5359e646..5b6a0e135eb 100644 --- a/mysql-test/t/explain_json.test +++ b/mysql-test/t/explain_json.test @@ -134,5 +134,17 @@ select * from t2 where t2.a in ( select a from t1 where t1.b=t2.b); set optimizer_switch=@tmp; drop table t1,t2; + +--echo # +--echo # MRR for range access (no BKA, just MRR) +--echo # +create table t1 (a int, b int, key(a)); +insert into t1 select tbl1.a+10*tbl2.a, 12345 from t0 tbl1, t0 tbl2; +set @tmp= @@optimizer_switch; +set optimizer_switch='mrr=on,mrr_sort_keys=on'; + +explain format=json select * from t1 where a < 3; + +drop table t1; drop table t0; |