From 96e092dc73529978053c1e41aa09b70fd2c7c408 Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Tue, 15 Dec 2009 10:16:46 +0300 Subject: Backport into MariaDB-5.2 the following: WL#2474 "Multi Range Read: Change the default MRR implementation to implement new MRR interface" WL#2475 "Batched range read functions for MyISAM/InnoDb" "Index condition pushdown for MyISAM/InnoDB" Igor's fix from sp1r-igor@olga.mysql.com-20080330055902-07614: There could be observed the following problems: 1. EXPLAIN did not mention pushdown conditions from on expressions in the 'extra' column. As a result if a query had no where conditions pushed down to a table, but had on conditions pushed to this table the 'extra' column in the EXPLAIN for the table missed 'using where'. 2. Conditions for ref access were not eliminated from on expressions though such conditions were eliminated from the where condition. --- mysql-test/r/distinct.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test/r/distinct.result') diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result index e0324af8cfd..4febf4638b0 100644 --- a/mysql-test/r/distinct.result +++ b/mysql-test/r/distinct.result @@ -174,7 +174,7 @@ INSERT INTO t3 VALUES (1,'1'),(2,'2'),(1,'1'),(2,'2'); explain SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 4 Using temporary -1 SIMPLE t3 ref a a 5 test.t1.b 2 Using where; Using index +1 SIMPLE t3 ref a a 5 test.t1.b 2 Using index 1 SIMPLE t2 index a a 4 NULL 5 Using where; Using index; Distinct; Using join buffer SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a; a @@ -190,7 +190,7 @@ insert into t3 select * from t4; explain select distinct t1.a from t1,t3 where t1.a=t3.a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 4 Using index; Using temporary -1 SIMPLE t3 ref a a 5 test.t1.a 11 Using where; Using index; Distinct +1 SIMPLE t3 ref a a 5 test.t1.a 11 Using index; Distinct select distinct t1.a from t1,t3 where t1.a=t3.a; a 1 -- cgit v1.2.1