diff options
author | Igor Babaev <igor@askmonty.org> | 2011-11-15 13:03:00 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-11-15 13:03:00 -0800 |
commit | b4b7d941fea8b17bd0db2d30a74df6596101b4ed (patch) | |
tree | abccede71e3bb1a0c65d0e18f4462ac40bcb1097 /mysql-test/suite | |
parent | db0aed93482759844af7b39c9bf6e7fe141f28f6 (diff) | |
download | mariadb-git-b4b7d941fea8b17bd0db2d30a74df6596101b4ed.tar.gz |
Fixed LP bug #889750.
If the optimizer switch 'semijoin_with_cache' is set to 'off' then
join cache cannot be used to join inner tables of a semijoin.
Also fixed a bug in the function check_join_cache_usage() that led
to wrong output of the EXPLAIN commands for some test cases.
Diffstat (limited to 'mysql-test/suite')
-rw-r--r-- | mysql-test/suite/pbxt/r/derived.result | 4 | ||||
-rw-r--r-- | mysql-test/suite/pbxt/r/subselect.result | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/mysql-test/suite/pbxt/r/derived.result b/mysql-test/suite/pbxt/r/derived.result index 75d5fcf8b16..4fc9216f126 100644 --- a/mysql-test/suite/pbxt/r/derived.result +++ b/mysql-test/suite/pbxt/r/derived.result @@ -190,13 +190,13 @@ pla_id test explain SELECT STRAIGHT_JOIN d.pla_id, m2.mat_id FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY m2 ALL NULL NULL NULL NULL 9 -1 PRIMARY <derived2> ALL NULL $hj 7 test.m2.matintnum 9 Using where +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 9 Using where 2 DERIVED mp ALL NULL NULL NULL NULL 9 Using temporary; Using filesort 2 DERIVED m1 eq_ref PRIMARY PRIMARY 3 test.mp.mat_id 1 explain SELECT STRAIGHT_JOIN d.pla_id, m2.test FROM t1 m2 INNER JOIN (SELECT mp.pla_id, MIN(m1.matintnum) AS matintnum FROM t2 mp INNER JOIN t1 m1 ON mp.mat_id=m1.mat_id GROUP BY mp.pla_id) d ON d.matintnum=m2.matintnum; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY m2 ALL NULL NULL NULL NULL 9 -1 PRIMARY <derived2> ALL NULL $hj 7 test.m2.matintnum 9 Using where +1 PRIMARY <derived2> ALL NULL NULL NULL NULL 9 Using where 2 DERIVED mp ALL NULL NULL NULL NULL 9 Using temporary; Using filesort 2 DERIVED m1 eq_ref PRIMARY PRIMARY 3 test.mp.mat_id 1 drop table t1,t2; diff --git a/mysql-test/suite/pbxt/r/subselect.result b/mysql-test/suite/pbxt/r/subselect.result index 4cbbecf284f..f1af0ecc057 100644 --- a/mysql-test/suite/pbxt/r/subselect.result +++ b/mysql-test/suite/pbxt/r/subselect.result @@ -1362,7 +1362,7 @@ explain extended select * from t2 where t2.a in (select t1.a from t1,t3 where t1 id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t2 index a a 5 NULL 4 100.00 Using where; Using index; Start temporary 1 PRIMARY t1 ref a a 5 test.t2.a 1 100.00 Using index -1 PRIMARY t3 index a a 5 NULL 3 100.00 Using where; Using index; End temporary; Using join buffer (flat, BNL join) +1 PRIMARY t3 index a a 5 NULL 3 100.00 Using where; Using index; End temporary Warnings: Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` semi join (`test`.`t1` join `test`.`t3`) where ((`test`.`t1`.`a` = `test`.`t2`.`a`) and (`test`.`t3`.`a` = `test`.`t1`.`b`)) insert into t1 values (3,31); |