From 255fd6c9294025ced406382980b0ad51960f0971 Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Mon, 5 Dec 2011 01:31:42 +0400 Subject: Make subquery Materialization, as well as semi-join Materialization be shown in EXPLAIN as select_type==MATERIALIZED. Before, we had select_type==SUBQUERY and it was difficult to tell materialized subqueries from uncorrelated scalar-context subqueries. --- mysql-test/r/subselect3_jcl6.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test/r/subselect3_jcl6.result') diff --git a/mysql-test/r/subselect3_jcl6.result b/mysql-test/r/subselect3_jcl6.result index 59848c565d5..59750f2cfa0 100644 --- a/mysql-test/r/subselect3_jcl6.result +++ b/mysql-test/r/subselect3_jcl6.result @@ -1189,7 +1189,7 @@ 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 ALL distinct_key NULL NULL NULL 2 1 PRIMARY t3 ref a a 5 test.t2.a 1 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan -2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 Using where +2 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 Using where select * from t3 where a in (select a from t2); a filler 1 filler @@ -1483,7 +1483,7 @@ FROM t3 ); id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00 -3 SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00 +3 MATERIALIZED t3 ALL NULL NULL NULL NULL 2 100.00 2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where Warnings: Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (not(<(select `test`.`t2`.`a` from `test`.`t2` where (`test`.`t2`.`a` = 9))>(((select `test`.`t2`.`a` from `test`.`t2` where (`test`.`t2`.`a` = 9)),(select `test`.`t2`.`a` from `test`.`t2` where (`test`.`t2`.`a` = 9)) in ( (select `test`.`t3`.`b` from `test`.`t3` ), (9 in on distinct_key where ((9 = ``.`b`)))))))) -- cgit v1.2.1