#At file:///net/atum17/export/home2/tmp/jw159207/mysql/repo/push-scan-scan/ based on revid:jan.wedvik@stripped
3345 Jan Wedvik 2010-11-08
This commit improves output from 'explain extended' for operations that
cannot be pushed:
- Instead of the generic "unknown access 'type'", there are now several
distinct explanations of why an access operation cannot be pushed.
- Terminology in 'explain extended' has been made more consistent with
other SQL in- and output.
Also, 'explain extended' is now used in the ndb_join_pushdown regression test.
modified:
mysql-test/suite/ndb/r/ndb_join_pushdown.result
mysql-test/suite/ndb/t/ndb_join_pushdown.test
sql/abstract_query_plan.cc
sql/abstract_query_plan.h
sql/ha_ndbcluster.cc
=== modified file 'mysql-test/suite/ndb/r/ndb_join_pushdown.result'
--- a/mysql-test/suite/ndb/r/ndb_join_pushdown.result 2010-11-06 09:24:09 +0000
+++ b/mysql-test/suite/ndb/r/ndb_join_pushdown.result 2010-11-08 15:13:37 +0000
@@ -19,13 +19,15 @@ insert into t1 values
(2,1,3,4), (2,3,4,5), (2,4,5,1),
(3,1,1,2), (3,2,2,3), (3,4,3,4),
(4,1,4,5), (4,2,5,1), (4,3,1,2);
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 16 Parent of 2 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 16 12.50 Parent of 2 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` where ((`test`.`t2`.`b` = `test`.`t1`.`c`) and (`test`.`t2`.`a` = `test`.`t1`.`b`))
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c;
@@ -43,13 +45,15 @@ a b c d a b c d
4 1 4 5 1 4 2 3
4 3 1 2 3 1 1 2
4 4 4 4 4 4 4 4
-explain
+explain extended
select *
from t1
left join t1 as t2 on t2.a = t1.b and t2.b = t1.c;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 16 Parent of 2 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 16 100.00 Parent of 2 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t1` left join `test`.`t1` `t2` on(((`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t2`.`b` = `test`.`t1`.`c`))) where 1
select *
from t1
left join t1 as t2 on t2.a = t1.b and t2.b = t1.c;
@@ -70,15 +74,17 @@ a b c d a b c d
4 2 5 1 NULL NULL NULL NULL
4 3 1 2 3 1 1 2
4 4 4 4 4 4 4 4
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
join t1 as t3 on t3.a = t2.a and t3.b = t2.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 16 Parent of 3 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 16 100.00 Parent of 3 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` where ((`test`.`t2`.`b` = `test`.`t1`.`c`) and (`test`.`t3`.`b` = `test`.`t1`.`c`) and (`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t3`.`a` = `test`.`t1`.`b`))
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -97,15 +103,17 @@ a b c d a b c d a b c d
4 1 4 5 1 4 2 3 1 4 2 3
4 3 1 2 3 1 1 2 3 1 1 2
4 4 4 4 4 4 4 4 4 4 4 4
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
left join t1 as t3 on t3.a = t2.a and t3.b = t2.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 16 Parent of 3 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.a,test.t2.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 16 100.00 Parent of 3 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.a,test.t2.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` left join `test`.`t1` `t3` on(((`test`.`t3`.`b` = `test`.`t1`.`c`) and (`test`.`t3`.`a` = `test`.`t1`.`b`))) where ((`test`.`t2`.`b` = `test`.`t1`.`c`) and (`test`.`t2`.`a` = `test`.`t1`.`b`))
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -124,15 +132,17 @@ a b c d a b c d a b c d
4 1 4 5 1 4 2 3 1 4 2 3
4 3 1 2 3 1 1 2 3 1 1 2
4 4 4 4 4 4 4 4 4 4 4 4
-explain
+explain extended
select *
from t1
left join t1 as t2 on t2.a = t1.b and t2.b = t1.c
left join t1 as t3 on t3.a = t2.a and t3.b = t2.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 16 Parent of 3 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.a,test.t2.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 16 100.00 Parent of 3 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.a,test.t2.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1` left join `test`.`t1` `t2` on(((`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t2`.`b` = `test`.`t1`.`c`))) left join `test`.`t1` `t3` on(((`test`.`t3`.`a` = `test`.`t2`.`a`) and (`test`.`t3`.`b` = `test`.`t2`.`b`))) where 1
select *
from t1
left join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -155,42 +165,59 @@ a b c d a b c d a b c d
4 3 1 2 3 1 1 2 3 1 1 2
4 4 4 4 4 4 4 4 4 4 4 4
set ndb_join_pushdown=true;
-explain
+explain extended
+select *
+from t1
+join t1 as t2 on t2.a = t1.c and t2.b = t1.d procedure analyse();
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 16 100.00
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 100.00
+Warnings:
+Note 1644 Table 't1' is not pushable: 'PROCEDURE'-clause post processing cannot be pushed.
+Note 1644 Table 't2' is not pushable: 'PROCEDURE'-clause post processing cannot be pushed.
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` where ((`test`.`t2`.`b` = `test`.`t1`.`d`) and (`test`.`t2`.`a` = `test`.`t1`.`c`))
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.a = 2 and t1.b = 3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1 Parent of 2 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1 100.00 Parent of 2 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` where ((`test`.`t2`.`b` = `test`.`t1`.`d`) and (`test`.`t2`.`a` = `test`.`t1`.`c`) and (`test`.`t1`.`b` = 3) and (`test`.`t1`.`a` = 2))
select *
from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.a = 2 and t1.b = 3;
a b c d a b c d
-explain
+explain extended
select *
from t1
left join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.a = 2 and t1.b = 3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1 Parent of 2 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1 100.00 Parent of 2 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t1` left join `test`.`t1` `t2` on(((`test`.`t2`.`b` = `test`.`t1`.`d`) and (`test`.`t2`.`a` = `test`.`t1`.`c`))) where ((`test`.`t1`.`b` = 3) and (`test`.`t1`.`a` = 2))
select *
from t1
left join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.a = 2 and t1.b = 3;
a b c d a b c d
2 3 4 5 NULL NULL NULL NULL
-explain
+explain extended
select *
from t1
left join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.a = 2 and t1.b = 3
order by t1.c;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1 Parent of 2 pushed join@1; Using where; Using filesort
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1 100.00 Parent of 2 pushed join@1; Using where; Using filesort
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t1` left join `test`.`t1` `t2` on(((`test`.`t2`.`b` = `test`.`t1`.`d`) and (`test`.`t2`.`a` = `test`.`t1`.`c`))) where ((`test`.`t1`.`b` = 3) and (`test`.`t1`.`a` = 2)) order by `test`.`t1`.`c`
select *
from t1
left join t1 as t2 on t2.a = t1.c and t2.b = t1.d
@@ -199,26 +226,30 @@ order by t1.c;
a b c d a b c d
2 3 4 5 NULL NULL NULL NULL
set ndb_join_pushdown=false;
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.a = 2 and t1.b = 3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+Warnings:
+Note 1003 select '2' AS `a`,'3' AS `b`,'4' AS `c`,'5' AS `d`,NULL AS `a`,NULL AS `b`,NULL AS `c`,NULL AS `d` from `test`.`t1` join `test`.`t1` `t2` where 0
select *
from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.a = 2 and t1.b = 3;
a b c d a b c d
-explain
+explain extended
select *
from t1
left join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.a = 2 and t1.b = 3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1
-1 SIMPLE t2 const PRIMARY PRIMARY 8 const,const 0 unique row not found
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1 100.00
+1 SIMPLE t2 const PRIMARY PRIMARY 8 const,const 0 0.00 unique row not found
+Warnings:
+Note 1003 select '2' AS `a`,'3' AS `b`,'4' AS `c`,'5' AS `d`,NULL AS `a`,NULL AS `b`,NULL AS `c`,NULL AS `d` from `test`.`t1` left join `test`.`t1` `t2` on((multiple equal('4') and multiple equal('5'))) where 1
select *
from t1
left join t1 as t2 on t2.a = t1.c and t2.b = t1.d
@@ -226,28 +257,32 @@ where t1.a = 2 and t1.b = 3;
a b c d a b c d
2 3 4 5 NULL NULL NULL NULL
set ndb_join_pushdown=true;
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.a = 1 and t1.b = 1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1 Parent of 2 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1 100.00 Parent of 2 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` where ((`test`.`t2`.`b` = `test`.`t1`.`d`) and (`test`.`t2`.`a` = `test`.`t1`.`c`) and (`test`.`t1`.`b` = 1) and (`test`.`t1`.`a` = 1))
select *
from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.a = 1 and t1.b = 1;
a b c d a b c d
1 1 1 1 1 1 1 1
-explain
+explain extended
select *
from t1
left join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.a = 1 and t1.b = 1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1 Parent of 2 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1 100.00 Parent of 2 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t1` left join `test`.`t1` `t2` on(((`test`.`t2`.`b` = `test`.`t1`.`d`) and (`test`.`t2`.`a` = `test`.`t1`.`c`))) where ((`test`.`t1`.`b` = 1) and (`test`.`t1`.`a` = 1))
select *
from t1
left join t1 as t2 on t2.a = t1.c and t2.b = t1.d
@@ -255,28 +290,32 @@ where t1.a = 1 and t1.b = 1;
a b c d a b c d
1 1 1 1 1 1 1 1
set ndb_join_pushdown=false;
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.a = 1 and t1.b = 1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1
-1 SIMPLE t2 const PRIMARY PRIMARY 8 const,const 1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1 100.00
+1 SIMPLE t2 const PRIMARY PRIMARY 8 const,const 1 100.00
+Warnings:
+Note 1003 select '1' AS `a`,'1' AS `b`,'1' AS `c`,'1' AS `d`,'1' AS `a`,'1' AS `b`,'1' AS `c`,'1' AS `d` from `test`.`t1` join `test`.`t1` `t2` where 1
select *
from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.a = 1 and t1.b = 1;
a b c d a b c d
1 1 1 1 1 1 1 1
-explain
+explain extended
select *
from t1
left join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.a = 1 and t1.b = 1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1
-1 SIMPLE t2 const PRIMARY PRIMARY 8 const,const 1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1 100.00
+1 SIMPLE t2 const PRIMARY PRIMARY 8 const,const 1 100.00
+Warnings:
+Note 1003 select '1' AS `a`,'1' AS `b`,'1' AS `c`,'1' AS `d`,'1' AS `a`,'1' AS `b`,'1' AS `c`,'1' AS `d` from `test`.`t1` left join `test`.`t1` `t2` on((multiple equal('1') and multiple equal('1'))) where 1
select *
from t1
left join t1 as t2 on t2.a = t1.c and t2.b = t1.d
@@ -284,15 +323,17 @@ where t1.a = 1 and t1.b = 1;
a b c d a b c d
1 1 1 1 1 1 1 1
set ndb_join_pushdown=true;
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.c
join t1 as t3 on t3.a = t1.c and t3.b = t2.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 16 Parent of 3 pushed join@1
-1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.c 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t2.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 16 100.00 Parent of 3 pushed join@1
+1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.c 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t2.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` where ((`test`.`t3`.`b` = `test`.`t2`.`b`) and (`test`.`t2`.`a` = `test`.`t1`.`c`) and (`test`.`t3`.`a` = `test`.`t1`.`c`))
select *
from t1
join t1 as t2 on t2.a = t1.c
@@ -350,14 +391,18 @@ a b c d a b c d a b c d
4 4 4 4 4 2 5 1 4 2 5 1
4 4 4 4 4 3 1 2 4 3 1 2
4 4 4 4 4 4 4 4 4 4 4 4
-explain
+explain extended
select STRAIGHT_JOIN *
FROM (t1 as X CROSS JOIN t1 as Y)
JOIN t1 as Z ON Z.a=X.a and Z.b=Y.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE X ALL PRIMARY NULL NULL NULL 16
-1 SIMPLE Y ALL NULL NULL NULL NULL 16 Parent of 2 pushed join@1
-1 SIMPLE Z eq_ref PRIMARY PRIMARY 8 test.X.a,test.Y.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE X ALL PRIMARY NULL NULL NULL 16 100.00
+1 SIMPLE Y ALL NULL NULL NULL NULL 16 100.00 Parent of 2 pushed join@1
+1 SIMPLE Z eq_ref PRIMARY PRIMARY 8 test.X.a,test.Y.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1644 Can't push table 'Y' as child, 'type' must be a 'ref' access
+Note 1644 Can't push table 'Z' as child of 'X', column 'Y.b' is outside scope of pushable join
+Note 1003 select straight_join `test`.`X`.`a` AS `a`,`test`.`X`.`b` AS `b`,`test`.`X`.`c` AS `c`,`test`.`X`.`d` AS `d`,`test`.`Y`.`a` AS `a`,`test`.`Y`.`b` AS `b`,`test`.`Y`.`c` AS `c`,`test`.`Y`.`d` AS `d`,`test`.`Z`.`a` AS `a`,`test`.`Z`.`b` AS `b`,`test`.`Z`.`c` AS `c`,`test`.`Z`.`d` AS `d` from `test`.`t1` `X` join `test`.`t1` `Y` join `test`.`t1` `Z` where ((`test`.`Z`.`b` = `test`.`Y`.`b`) and (`test`.`Z`.`a` = `test`.`X`.`a`))
select STRAIGHT_JOIN *
FROM (t1 as X CROSS JOIN t1 as Y)
JOIN t1 as Z ON Z.a=X.a and Z.b=Y.b;
@@ -618,15 +663,18 @@ a b c d a b c d a b c d
4 4 4 4 4 2 5 1 4 2 5 1
4 4 4 4 4 3 1 2 4 3 1 2
4 4 4 4 4 4 4 4 4 4 4 4
-explain
+explain extended
select *
from t1
straight_join t1 as t2 on t2.a = t1.b+0 and t2.b = t1.c
straight_join t1 as t3 on t3.a = t1.b and t3.b = t2.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 16 Parent of 2 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 func,test.t1.c 1 Using where
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 16 100.00 Parent of 2 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 func,test.t1.c 1 100.00 Using where
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1644 Can't push table 't2' as child, column 'a' does neither 'ref' a column nor a constant
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1` straight_join `test`.`t1` `t2` straight_join `test`.`t1` `t3` where ((`test`.`t2`.`b` = `test`.`t1`.`c`) and (`test`.`t3`.`b` = `test`.`t1`.`c`) and (`test`.`t3`.`a` = `test`.`t1`.`b`) and (`test`.`t2`.`a` = (`test`.`t1`.`b` + 0)))
select *
from t1
straight_join t1 as t2 on t2.a = t1.b+0 and t2.b = t1.c
@@ -645,16 +693,19 @@ a b c d a b c d a b c d
4 1 4 5 1 4 2 3 1 4 2 3
4 3 1 2 3 1 1 2 3 1 1 2
4 4 4 4 4 4 4 4 4 4 4 4
-explain
+explain extended
select *
from t1
straight_join t1 as t2 on t2.a = t1.b+0 and t2.b = t1.c
straight_join t1 as t3 on t3.a = t1.b and t3.b = t2.b
where t1.a=1 and t1.d=1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 func,test.t1.c 1 Using where
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1; Using where with pushed condition: (`test`.`t1`.`d` = 1)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 func,test.t1.c 1 100.00 Using where
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1644 Can't push table 't2' as child, column 'a' does neither 'ref' a column nor a constant
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1` straight_join `test`.`t1` `t2` straight_join `test`.`t1` `t3` where ((`test`.`t2`.`b` = `test`.`t1`.`c`) and (`test`.`t3`.`b` = `test`.`t1`.`c`) and (`test`.`t3`.`a` = `test`.`t1`.`b`) and (`test`.`t1`.`d` = 1) and (`test`.`t1`.`a` = 1) and (`test`.`t2`.`a` = (`test`.`t1`.`b` + 0)))
select *
from t1
straight_join t1 as t2 on t2.a = t1.b+0 and t2.b = t1.c
@@ -662,15 +713,19 @@ straight_join t1 as t3 on t3.a = t1.b an
where t1.a=1 and t1.d=1;
a b c d a b c d a b c d
1 1 1 1 1 1 1 1 1 1 1 1
-explain
+explain extended
select *
from t1
straight_join t1 as t2 on t2.a = t1.b+0
straight_join t1 as t3 on t3.a = t1.b and t3.b = t2.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 16
-1 SIMPLE t2 ref PRIMARY PRIMARY 4 func 1 Parent of 2 pushed join@1; Using where
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 16 100.00
+1 SIMPLE t2 ref PRIMARY PRIMARY 4 func 1 100.00 Parent of 2 pushed join@1; Using where
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1644 Can't push table 't2' as child, column 'a' does neither 'ref' a column nor a constant
+Note 1644 Can't push table 't3' as child of 't1', column 't2.b' is outside scope of pushable join
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1` straight_join `test`.`t1` `t2` straight_join `test`.`t1` `t3` where ((`test`.`t3`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = `test`.`t1`.`b`) and (`test`.`t2`.`a` = (`test`.`t1`.`b` + 0)))
select *
from t1
straight_join t1 as t2 on t2.a = t1.b+0
@@ -750,16 +805,19 @@ PRIMARY KEY (`a`,`b`)
insert into t1_myisam values
(1,1,1,1), (2,2,1,1), (3,3,1,1), (4,4,1,1);
set ndb_join_pushdown=true;
-explain
+explain extended
select *
from t1_myisam as t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
join t1 as t3 on t3.a = t2.a and t3.b = t2.b
where t1.a=2 and t1.b=2;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 const,const 1 Parent of 2 pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 const,test.t2.b 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1 100.00
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 const,const 1 100.00 Parent of 2 pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 const,test.t2.b 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1644 Table 't1' not in ndb engine, not pushable
+Note 1003 select '2' AS `a`,'2' AS `b`,'1' AS `c`,'1' AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1_myisam` `t1` join `test`.`t1` `t2` join `test`.`t1` `t3` where ((`test`.`t2`.`b` = '1') and (`test`.`t3`.`b` = '1') and (`test`.`t2`.`a` = '1') and (`test`.`t3`.`a` = '1'))
select *
from t1_myisam as t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
@@ -769,13 +827,15 @@ a b c d a b c d a b c d
2 2 1 1 1 1 1 1 1 1 1 1
drop table t1_myisam;
set ndb_join_pushdown=true;
-explain select *
+explain extended select *
from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.d = 3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 16 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.c,const 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 16 100.00 Parent of 2 pushed join@1; Using where with pushed condition: (`test`.`t1`.`d` = 3)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.c,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` where ((`test`.`t2`.`a` = `test`.`t1`.`c`) and (`test`.`t1`.`d` = 3) and (`test`.`t2`.`b` = 3))
select *
from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
@@ -784,13 +844,15 @@ a b c d a b c d
1 4 2 3 2 3 4 5
3 2 2 3 2 3 4 5
3 3 3 3 3 3 3 3
-explain select *
+explain extended select *
from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.a > 2 and t1.d = 3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 10 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.c,const 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 10 100.00 Parent of 2 pushed join@1; Using where with pushed condition: ((`test`.`t1`.`d` = 3) and (`test`.`t1`.`a` > 2))
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.c,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` where ((`test`.`t2`.`a` = `test`.`t1`.`c`) and (`test`.`t1`.`d` = 3) and (`test`.`t2`.`b` = 3) and (`test`.`t1`.`a` > 2))
select *
from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
@@ -798,13 +860,15 @@ where t1.a > 2 and t1.d = 3;
a b c d a b c d
3 2 2 3 2 3 4 5
3 3 3 3 3 3 3 3
-explain select *
+explain extended select *
from t1 join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.d = 3
order by t1.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL PRIMARY 8 NULL 16 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.c,const 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 index NULL PRIMARY 8 NULL 16 100.00 Parent of 2 pushed join@1; Using where with pushed condition: (`test`.`t1`.`d` = 3)
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.c,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` where ((`test`.`t2`.`a` = `test`.`t1`.`c`) and (`test`.`t1`.`d` = 3) and (`test`.`t2`.`b` = 3)) order by `test`.`t1`.`a`
select *
from t1 join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.d = 3
@@ -814,16 +878,20 @@ a b c d a b c d
3 2 2 3 2 3 4 5
3 3 3 3 3 3 3 3
set ndb_join_pushdown=true;
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.c
join t1 as t3 on t3.a = t2.c and t3.b = t2.d
where t1.a = 1 and t1.b = 1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1
-1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.c 1 Parent of 2 pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.c,test.t2.d 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1 100.00
+1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.c 1 100.00 Parent of 2 pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.c,test.t2.d 1 100.00 Child of pushed join@1
+Warnings:
+Note 1644 Push of table 't2' as scan-child with lookup-root 't1' not implemented
+Note 1644 Can't push table 't3' as child of 't1', column 't2.c' is outside scope of pushable join
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` where ((`test`.`t2`.`a` = `test`.`t1`.`c`) and (`test`.`t3`.`b` = `test`.`t2`.`d`) and (`test`.`t3`.`a` = `test`.`t2`.`c`) and (`test`.`t1`.`b` = 1) and (`test`.`t1`.`a` = 1))
select *
from t1
join t1 as t2 on t2.a = t1.c
@@ -833,16 +901,20 @@ a b c d a b c d a b c d
1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 3 1 2 1 2 5 1
1 1 1 1 1 4 2 3 2 3 4 5
-explain
+explain extended
select *
from t1
left join t1 as t2 on t2.a = t1.c
left join t1 as t3 on t3.a = t2.c and t3.b = t2.d
where t1.a = 1 and t1.b = 1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1
-1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.c 1 Parent of 2 pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.c,test.t2.d 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1 100.00
+1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.c 1 100.00 Parent of 2 pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.c,test.t2.d 1 100.00 Child of pushed join@1
+Warnings:
+Note 1644 Push of table 't2' as scan-child with lookup-root 't1' not implemented
+Note 1644 Can't push table 't3' as child of 't1', column 't2.c' is outside scope of pushable join
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1` left join `test`.`t1` `t2` on((`test`.`t2`.`a` = `test`.`t1`.`c`)) left join `test`.`t1` `t3` on(((`test`.`t3`.`b` = `test`.`t2`.`d`) and (`test`.`t3`.`a` = `test`.`t2`.`c`))) where ((`test`.`t1`.`b` = 1) and (`test`.`t1`.`a` = 1))
select *
from t1
left join t1 as t2 on t2.a = t1.c
@@ -854,16 +926,18 @@ a b c d a b c d a b c d
1 1 1 1 1 3 1 2 1 2 5 1
1 1 1 1 1 4 2 3 2 3 4 5
set ndb_join_pushdown=false;
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.c
join t1 as t3 on t3.a = t2.c and t3.b = t2.d
where t1.a = 1 and t1.b = 1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1
-1 SIMPLE t2 ref PRIMARY PRIMARY 4 const 10
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.c,test.t2.d 1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1 100.00
+1 SIMPLE t2 ref PRIMARY PRIMARY 4 const 10 100.00
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.c,test.t2.d 1 100.00
+Warnings:
+Note 1003 select '1' AS `a`,'1' AS `b`,'1' AS `c`,'1' AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` where ((`test`.`t2`.`a` = '1') and (`test`.`t3`.`b` = `test`.`t2`.`d`) and (`test`.`t3`.`a` = `test`.`t2`.`c`))
select *
from t1
join t1 as t2 on t2.a = t1.c
@@ -873,16 +947,18 @@ a b c d a b c d a b c d
1 1 1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 3 1 2 1 2 5 1
1 1 1 1 1 4 2 3 2 3 4 5
-explain
+explain extended
select *
from t1
left join t1 as t2 on t2.a = t1.c
left join t1 as t3 on t3.a = t2.c and t3.b = t2.d
where t1.a = 1 and t1.b = 1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1
-1 SIMPLE t2 ref PRIMARY PRIMARY 4 const 10
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.c,test.t2.d 1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 const PRIMARY PRIMARY 8 const,const 1 100.00
+1 SIMPLE t2 ref PRIMARY PRIMARY 4 const 10 100.00
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.c,test.t2.d 1 100.00
+Warnings:
+Note 1003 select '1' AS `a`,'1' AS `b`,'1' AS `c`,'1' AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1` left join `test`.`t1` `t2` on((`test`.`t2`.`a` = '1')) left join `test`.`t1` `t3` on(((`test`.`t3`.`b` = `test`.`t2`.`d`) and (`test`.`t3`.`a` = `test`.`t2`.`c`))) where 1
select *
from t1
left join t1 as t2 on t2.a = t1.c
@@ -894,14 +970,16 @@ a b c d a b c d a b c d
1 1 1 1 1 3 1 2 1 2 5 1
1 1 1 1 1 4 2 3 2 3 4 5
set ndb_join_pushdown=true;
-explain
+explain extended
select *
from t1 as t2
join t1 as t3 on t3.a = t2.c and t3.b = t2.d
where t2.a = 1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.c,test.t2.d 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.c,test.t2.d 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1` `t2` join `test`.`t1` `t3` where ((`test`.`t3`.`b` = `test`.`t2`.`d`) and (`test`.`t3`.`a` = `test`.`t2`.`c`) and (`test`.`t2`.`a` = 1))
select *
from t1 as t2
join t1 as t3 on t3.a = t2.c and t3.b = t2.d
@@ -911,15 +989,17 @@ a b c d a b c d
1 3 1 2 1 2 5 1
1 4 2 3 2 3 4 5
set ndb_join_pushdown=true;
-explain
+explain extended
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
join t1 as t3 on t3.a = t2.c and t3.b = t1.c;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16 Parent of 3 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.c,test.t1.c 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16 100.00 Parent of 3 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t2.c,test.t1.c 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select straight_join `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` where ((`test`.`t2`.`b` = `test`.`t1`.`b`) and (`test`.`t2`.`a` = `test`.`t1`.`a`) and (`test`.`t3`.`b` = `test`.`t1`.`c`) and (`test`.`t3`.`a` = `test`.`t2`.`c`))
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
@@ -938,17 +1018,20 @@ a b c d a b c d a b c d
4 1 4 5 4 1 4 5 4 4 4 4
4 3 1 2 4 3 1 2 1 1 1 1
4 4 4 4 4 4 4 4 4 4 4 4
-explain
+explain extended
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
join t1 as t3 on t3.a = t1.c and t3.b = t1.d
join t1 as t4 on t4.a = t3.c and t4.b = t2.c;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16 Parent of 3 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 Child of pushed join@1
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t3.c,test.t2.c 1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16 100.00 Parent of 3 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 100.00 Child of pushed join@1
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t3.c,test.t2.c 1 100.00
+Warnings:
+Note 1644 Can't push table 't4' as child of 't1', no parents found within scope
+Note 1003 select straight_join `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t4`.`c` AS `c`,`test`.`t4`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` join `test`.`t1` `t4` where ((`test`.`t2`.`b` = `test`.`t1`.`b`) and (`test`.`t2`.`a` = `test`.`t1`.`a`) and (`test`.`t3`.`b` = `test`.`t1`.`d`) and (`test`.`t3`.`a` = `test`.`t1`.`c`) and (`test`.`t4`.`b` = `test`.`t2`.`c`) and (`test`.`t4`.`a` = `test`.`t3`.`c`))
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
@@ -963,17 +1046,19 @@ a b c d a b c d a b c d a b c d
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 4 3 4 3 4 3 4 3 4 3 4 3 3 3 3
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
-explain
+explain extended
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
join t1 as t3 on t3.a = t1.c and t3.b = t2.d
join t1 as t4 on t4.a = t3.c and t4.b = t2.c;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16 Parent of 4 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t2.d 1 Child of pushed join@1
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t3.c,test.t2.c 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16 100.00 Parent of 4 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t2.d 1 100.00 Child of pushed join@1
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t3.c,test.t2.c 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select straight_join `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t4`.`c` AS `c`,`test`.`t4`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` join `test`.`t1` `t4` where ((`test`.`t2`.`b` = `test`.`t1`.`b`) and (`test`.`t2`.`a` = `test`.`t1`.`a`) and (`test`.`t3`.`b` = `test`.`t2`.`d`) and (`test`.`t3`.`a` = `test`.`t1`.`c`) and (`test`.`t4`.`b` = `test`.`t2`.`c`) and (`test`.`t4`.`a` = `test`.`t3`.`c`))
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
@@ -988,17 +1073,19 @@ a b c d a b c d a b c d a b c d
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 4 3 4 3 4 3 4 3 4 3 4 3 3 3 3
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
-explain
+explain extended
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
join t1 as t3 on t3.a = t1.c and t3.b = t2.d
join t1 as t4 on t4.a = t3.c and t4.b = t1.d;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16 Parent of 4 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t2.d 1 Child of pushed join@1
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t3.c,test.t1.d 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16 100.00 Parent of 4 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t2.d 1 100.00 Child of pushed join@1
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t3.c,test.t1.d 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select straight_join `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t4`.`c` AS `c`,`test`.`t4`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` join `test`.`t1` `t4` where ((`test`.`t2`.`b` = `test`.`t1`.`b`) and (`test`.`t2`.`a` = `test`.`t1`.`a`) and (`test`.`t3`.`b` = `test`.`t2`.`d`) and (`test`.`t3`.`a` = `test`.`t1`.`c`) and (`test`.`t4`.`b` = `test`.`t1`.`d`) and (`test`.`t4`.`a` = `test`.`t3`.`c`))
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
@@ -1013,17 +1100,19 @@ a b c d a b c d a b c d a b c d
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 4 3 4 3 4 3 4 3 4 3 4 3 4 3 4
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
-explain
+explain extended
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
join t1 as t3 on t3.a = t1.c and t3.b = t1.d
join t1 as t4 on t4.a = t3.a and t4.b = t2.c;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16 Parent of 4 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 Child of pushed join@1
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t2.c 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16 100.00 Parent of 4 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 100.00 Child of pushed join@1
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t2.c 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select straight_join `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t4`.`c` AS `c`,`test`.`t4`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` join `test`.`t1` `t4` where ((`test`.`t2`.`b` = `test`.`t1`.`b`) and (`test`.`t2`.`a` = `test`.`t1`.`a`) and (`test`.`t3`.`b` = `test`.`t1`.`d`) and (`test`.`t4`.`b` = `test`.`t2`.`c`) and (`test`.`t3`.`a` = `test`.`t1`.`c`) and (`test`.`t4`.`a` = `test`.`t1`.`c`))
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
@@ -1041,17 +1130,19 @@ a b c d a b c d a b c d a b c d
3 4 3 4 3 4 3 4 3 4 3 4 3 3 3 3
4 3 1 2 4 3 1 2 1 2 5 1 1 1 1 1
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
-explain
+explain extended
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
join t1 as t3 on t3.a = t1.c and t3.b = t1.d
join t1 as t4 on t4.a = t3.b and t4.b = t2.c;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16 Parent of 4 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 Child of pushed join@1
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t1.d,test.t2.c 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16 100.00 Parent of 4 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 100.00 Child of pushed join@1
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t1.d,test.t2.c 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select straight_join `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t4`.`c` AS `c`,`test`.`t4`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` join `test`.`t1` `t4` where ((`test`.`t2`.`b` = `test`.`t1`.`b`) and (`test`.`t2`.`a` = `test`.`t1`.`a`) and (`test`.`t3`.`a` = `test`.`t1`.`c`) and (`test`.`t4`.`b` = `test`.`t2`.`c`) and (`test`.`t3`.`b` = `test`.`t1`.`d`) and (`test`.`t4`.`a` = `test`.`t1`.`d`))
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
@@ -1069,17 +1160,19 @@ a b c d a b c d a b c d a b c d
3 4 3 4 3 4 3 4 3 4 3 4 4 3 1 2
4 3 1 2 4 3 1 2 1 2 5 1 2 1 3 4
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
-explain
+explain extended
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
join t1 as t3 on t3.a = t1.c and t3.b = t1.d
join t1 as t4 on t4.a = t3.c and t4.b = t2.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16 Parent of 4 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 Child of pushed join@1
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t3.c,test.t1.a 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16 100.00 Parent of 4 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 100.00 Child of pushed join@1
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t3.c,test.t1.a 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select straight_join `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t4`.`c` AS `c`,`test`.`t4`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` join `test`.`t1` `t4` where ((`test`.`t2`.`b` = `test`.`t1`.`b`) and (`test`.`t3`.`b` = `test`.`t1`.`d`) and (`test`.`t3`.`a` = `test`.`t1`.`c`) and (`test`.`t2`.`a` = `test`.`t1`.`a`) and (`test`.`t4`.`b` = `test`.`t1`.`a`) and (`test`.`t4`.`a` = `test`.`t3`.`c`))
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
@@ -1094,17 +1187,19 @@ a b c d a b c d a b c d a b c d
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 4 3 4 3 4 3 4 3 4 3 4 3 3 3 3
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
-explain
+explain extended
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
join t1 as t3 on t3.a = t1.c and t3.b = t1.d
join t1 as t4 on t4.a = t3.c and t4.b = t2.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16 Parent of 4 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 Child of pushed join@1
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t3.c,test.t1.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16 100.00 Parent of 4 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 100.00 Child of pushed join@1
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t3.c,test.t1.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select straight_join `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t4`.`c` AS `c`,`test`.`t4`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` join `test`.`t1` `t4` where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (`test`.`t3`.`b` = `test`.`t1`.`d`) and (`test`.`t3`.`a` = `test`.`t1`.`c`) and (`test`.`t2`.`b` = `test`.`t1`.`b`) and (`test`.`t4`.`b` = `test`.`t1`.`b`) and (`test`.`t4`.`a` = `test`.`t3`.`c`))
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
@@ -1119,17 +1214,19 @@ a b c d a b c d a b c d a b c d
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3 4 3 4 3 4 3 4 3 4 3 4 3 4 3 4
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
-explain
+explain extended
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
join t1 as t3 on t3.a = t1.c and t3.b = t1.d
join t1 as t4 on t4.a = t1.c and t4.b = t2.c;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16 Parent of 4 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 Child of pushed join@1
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t3.a,test.t2.c 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16 100.00 Parent of 4 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 100.00 Child of pushed join@1
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t3.a,test.t2.c 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select straight_join `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t4`.`c` AS `c`,`test`.`t4`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` join `test`.`t1` `t4` where ((`test`.`t2`.`b` = `test`.`t1`.`b`) and (`test`.`t2`.`a` = `test`.`t1`.`a`) and (`test`.`t3`.`b` = `test`.`t1`.`d`) and (`test`.`t4`.`b` = `test`.`t2`.`c`) and (`test`.`t3`.`a` = `test`.`t1`.`c`) and (`test`.`t4`.`a` = `test`.`t1`.`c`))
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
@@ -1147,17 +1244,19 @@ a b c d a b c d a b c d a b c d
3 4 3 4 3 4 3 4 3 4 3 4 3 3 3 3
4 3 1 2 4 3 1 2 1 2 5 1 1 1 1 1
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
-explain
+explain extended
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
join t1 as t3 on t3.a = t1.c and t3.b = t1.d
join t1 as t4 on t4.a = t3.c and t4.b = t1.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16 Parent of 4 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 Child of pushed join@1
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t3.c,test.t2.b 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 16 100.00 Parent of 4 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.a,test.t1.b 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.c,test.t1.d 1 100.00 Child of pushed join@1
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 8 test.t3.c,test.t2.b 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select straight_join `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t4`.`c` AS `c`,`test`.`t4`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` join `test`.`t1` `t4` where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and (`test`.`t3`.`b` = `test`.`t1`.`d`) and (`test`.`t3`.`a` = `test`.`t1`.`c`) and (`test`.`t2`.`b` = `test`.`t1`.`b`) and (`test`.`t4`.`b` = `test`.`t1`.`b`) and (`test`.`t4`.`a` = `test`.`t3`.`c`))
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
@@ -1173,16 +1272,18 @@ a b c d a b c d a b c d a b c d
3 4 3 4 3 4 3 4 3 4 3 4 3 4 3 4
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
set ndb_join_pushdown=true;
-explain
+explain extended
select * from t1 x, t1 y, t1 z, t1 where
y.a=x.d and y.b=x.b and
z.a=y.d and
t1.a = z.d and t1.b=z.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ALL NULL NULL NULL NULL 16 Parent of 4 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d,test.x.b 1 Child of pushed join@1
-1 SIMPLE z ref PRIMARY PRIMARY 4 test.y.d 1 Child of pushed join@1
-1 SIMPLE t1 eq_ref PRIMARY PRIMARY 8 test.z.d,test.z.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ALL NULL NULL NULL NULL 16 100.00 Parent of 4 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d,test.x.b 1 100.00 Child of pushed join@1
+1 SIMPLE z ref PRIMARY PRIMARY 4 test.y.d 1 100.00 Child of pushed join@1
+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 8 test.z.d,test.z.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a` AS `a`,`test`.`x`.`b` AS `b`,`test`.`x`.`c` AS `c`,`test`.`x`.`d` AS `d`,`test`.`y`.`a` AS `a`,`test`.`y`.`b` AS `b`,`test`.`y`.`c` AS `c`,`test`.`y`.`d` AS `d`,`test`.`z`.`a` AS `a`,`test`.`z`.`b` AS `b`,`test`.`z`.`c` AS `c`,`test`.`z`.`d` AS `d`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d` from `test`.`t1` `x` join `test`.`t1` `y` join `test`.`t1` `z` join `test`.`t1` where ((`test`.`t1`.`b` = `test`.`z`.`b`) and (`test`.`t1`.`a` = `test`.`z`.`d`) and (`test`.`z`.`a` = `test`.`y`.`d`) and (`test`.`y`.`b` = `test`.`x`.`b`) and (`test`.`y`.`a` = `test`.`x`.`d`))
select * from t1 x, t1 y, t1 z, t1 where
y.a=x.d and y.b=x.b and
z.a=y.d and
@@ -1227,13 +1328,15 @@ a b c d a b c d a b c d a b c d
4 4 4 4 4 4 4 4 4 2 5 1 1 2 5 1
4 4 4 4 4 4 4 4 4 3 1 2 2 3 4 5
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
-explain
+explain extended
select * from t1 x, t1 y where
x.a <= 2 and
y.a=x.d and y.b=x.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x range PRIMARY PRIMARY 4 NULL 10 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d,test.x.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x range PRIMARY PRIMARY 4 NULL 10 100.00 Parent of 2 pushed join@1; Using where with pushed condition: (`test`.`x`.`a` <= 2)
+1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d,test.x.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a` AS `a`,`test`.`x`.`b` AS `b`,`test`.`x`.`c` AS `c`,`test`.`x`.`d` AS `d`,`test`.`y`.`a` AS `a`,`test`.`y`.`b` AS `b`,`test`.`y`.`c` AS `c`,`test`.`y`.`d` AS `d` from `test`.`t1` `x` join `test`.`t1` `y` where ((`test`.`y`.`b` = `test`.`x`.`b`) and (`test`.`y`.`a` = `test`.`x`.`d`) and (`test`.`x`.`a` <= 2))
select * from t1 x, t1 y where
x.a <= 2 and
y.a=x.d and y.b=x.b;
@@ -1245,13 +1348,15 @@ a b c d a b c d
2 1 3 4 4 1 4 5
2 2 2 2 2 2 2 2
2 4 5 1 1 4 2 3
-explain
+explain extended
select * from t1 x, t1 y where
(x.a <= 2 or x.a > 3) and
y.a=x.d and y.b=x.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x range PRIMARY PRIMARY 4 NULL 20 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d,test.x.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x range PRIMARY PRIMARY 4 NULL 20 80.00 Parent of 2 pushed join@1; Using where with pushed condition: ((`test`.`x`.`a` <= 2) or (`test`.`x`.`a` > 3))
+1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d,test.x.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a` AS `a`,`test`.`x`.`b` AS `b`,`test`.`x`.`c` AS `c`,`test`.`x`.`d` AS `d`,`test`.`y`.`a` AS `a`,`test`.`y`.`b` AS `b`,`test`.`y`.`c` AS `c`,`test`.`y`.`d` AS `d` from `test`.`t1` `x` join `test`.`t1` `y` where ((`test`.`y`.`b` = `test`.`x`.`b`) and (`test`.`y`.`a` = `test`.`x`.`d`) and ((`test`.`x`.`a` <= 2) or (`test`.`x`.`a` > 3)))
select * from t1 x, t1 y where
(x.a <= 2 or x.a > 3) and
y.a=x.d and y.b=x.b;
@@ -1266,13 +1371,15 @@ a b c d a b c d
4 2 5 1 1 2 5 1
4 3 1 2 2 3 4 5
4 4 4 4 4 4 4 4
-explain
+explain extended
select * from t1 x, t1 y where
(x.a >= 2 or x.a < 3) and
y.a=x.d and y.b=x.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x range PRIMARY PRIMARY 4 NULL 20 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d,test.x.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x range PRIMARY PRIMARY 4 NULL 20 80.00 Parent of 2 pushed join@1; Using where with pushed condition: ((`test`.`x`.`a` >= 2) or (`test`.`x`.`a` < 3))
+1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d,test.x.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a` AS `a`,`test`.`x`.`b` AS `b`,`test`.`x`.`c` AS `c`,`test`.`x`.`d` AS `d`,`test`.`y`.`a` AS `a`,`test`.`y`.`b` AS `b`,`test`.`y`.`c` AS `c`,`test`.`y`.`d` AS `d` from `test`.`t1` `x` join `test`.`t1` `y` where ((`test`.`y`.`b` = `test`.`x`.`b`) and (`test`.`y`.`a` = `test`.`x`.`d`) and ((`test`.`x`.`a` >= 2) or (`test`.`x`.`a` < 3)))
select * from t1 x, t1 y where
(x.a >= 2 or x.a < 3) and
y.a=x.d and y.b=x.b;
@@ -1291,13 +1398,15 @@ a b c d a b c d
4 2 5 1 1 2 5 1
4 3 1 2 2 3 4 5
4 4 4 4 4 4 4 4
-explain
+explain extended
select * from t1 x, t1 y where
(x.a <= 2 or x.a in (0,5,4)) and
y.a=x.d and y.b=x.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x range PRIMARY PRIMARY 4 NULL 50 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d,test.x.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x range PRIMARY PRIMARY 4 NULL 50 32.00 Parent of 2 pushed join@1; Using where with pushed condition: ((`test`.`x`.`a` <= 2) or (`test`.`x`.`a` in (0,5,4)))
+1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d,test.x.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a` AS `a`,`test`.`x`.`b` AS `b`,`test`.`x`.`c` AS `c`,`test`.`x`.`d` AS `d`,`test`.`y`.`a` AS `a`,`test`.`y`.`b` AS `b`,`test`.`y`.`c` AS `c`,`test`.`y`.`d` AS `d` from `test`.`t1` `x` join `test`.`t1` `y` where ((`test`.`y`.`b` = `test`.`x`.`b`) and (`test`.`y`.`a` = `test`.`x`.`d`) and ((`test`.`x`.`a` <= 2) or (`test`.`x`.`a` in (0,5,4))))
select * from t1 x, t1 y where
(x.a <= 2 or x.a in (0,5,4)) and
y.a=x.d and y.b=x.b;
@@ -1312,13 +1421,15 @@ a b c d a b c d
4 2 5 1 1 2 5 1
4 3 1 2 2 3 4 5
4 4 4 4 4 4 4 4
-explain
+explain extended
select * from t1 x, t1 y where
(x.a <= 2 or (x.a,x.b) in ((0,0),(5,0),(4,3))) and
y.a=x.d and y.b=x.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ALL PRIMARY NULL NULL NULL 16 Parent of 2 pushed join@1; Using where
-1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d,test.x.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ALL PRIMARY NULL NULL NULL 16 100.00 Parent of 2 pushed join@1; Using where
+1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d,test.x.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a` AS `a`,`test`.`x`.`b` AS `b`,`test`.`x`.`c` AS `c`,`test`.`x`.`d` AS `d`,`test`.`y`.`a` AS `a`,`test`.`y`.`b` AS `b`,`test`.`y`.`c` AS `c`,`test`.`y`.`d` AS `d` from `test`.`t1` `x` join `test`.`t1` `y` where ((`test`.`y`.`b` = `test`.`x`.`b`) and (`test`.`y`.`a` = `test`.`x`.`d`) and ((`test`.`x`.`a` <= 2) or ((`test`.`x`.`a`,`test`.`x`.`b`) in ((0,0),(5,0),(4,3)))))
select * from t1 x, t1 y where
(x.a <= 2 or (x.a,x.b) in ((0,0),(5,0),(4,3))) and
y.a=x.d and y.b=x.b;
@@ -1331,17 +1442,19 @@ a b c d a b c d
2 2 2 2 2 2 2 2
2 4 5 1 1 4 2 3
4 3 1 2 2 3 4 5
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
join t1 as t3 on t3.a = t2.a and t3.b = t2.b
order by t1.c,t1.d,
t1.a, t1.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 16 Parent of 3 pushed join@1; Using temporary; Using filesort
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 16 100.00 Parent of 3 pushed join@1; Using temporary; Using filesort
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` where ((`test`.`t2`.`b` = `test`.`t1`.`c`) and (`test`.`t3`.`b` = `test`.`t1`.`c`) and (`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t3`.`a` = `test`.`t1`.`b`)) order by `test`.`t1`.`c`,`test`.`t1`.`d`,`test`.`t1`.`a`,`test`.`t1`.`b`
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -1362,17 +1475,19 @@ a b c d a b c d a b c d
4 4 4 4 4 4 4 4 4 4 4 4
2 3 4 5 3 4 3 4 3 4 3 4
4 1 4 5 1 4 2 3 1 4 2 3
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
join t1 as t3 on t3.a = t2.a and t3.b = t2.b
order by t1.c,t2.d,
t1.a, t1.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 16 Parent of 3 pushed join@1; Using temporary; Using filesort
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 16 100.00 Parent of 3 pushed join@1; Using temporary; Using filesort
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` where ((`test`.`t2`.`b` = `test`.`t1`.`c`) and (`test`.`t3`.`b` = `test`.`t1`.`c`) and (`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t3`.`a` = `test`.`t1`.`b`)) order by `test`.`t1`.`c`,`test`.`t2`.`d`,`test`.`t1`.`a`,`test`.`t1`.`b`
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -1393,16 +1508,18 @@ a b c d a b c d a b c d
4 1 4 5 1 4 2 3 1 4 2 3
2 3 4 5 3 4 3 4 3 4 3 4
4 4 4 4 4 4 4 4 4 4 4 4
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
join t1 as t3 on t3.a = t2.a and t3.b = t2.b
order by t1.a,t1.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL PRIMARY 8 NULL 16 Parent of 3 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 index NULL PRIMARY 8 NULL 16 100.00 Parent of 3 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` where ((`test`.`t2`.`b` = `test`.`t1`.`c`) and (`test`.`t3`.`b` = `test`.`t1`.`c`) and (`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t3`.`a` = `test`.`t1`.`b`)) order by `test`.`t1`.`a`,`test`.`t1`.`b`
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -1422,17 +1539,19 @@ a b c d a b c d a b c d
4 1 4 5 1 4 2 3 1 4 2 3
4 3 1 2 3 1 1 2 3 1 1 2
4 4 4 4 4 4 4 4 4 4 4 4
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
join t1 as t3 on t3.a = t2.a and t3.b = t2.b
order by t1.a,t2.b,
t1.a, t1.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 16 Parent of 3 pushed join@1; Using temporary; Using filesort
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 16 100.00 Parent of 3 pushed join@1; Using temporary; Using filesort
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` where ((`test`.`t2`.`b` = `test`.`t1`.`c`) and (`test`.`t3`.`b` = `test`.`t1`.`c`) and (`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t3`.`a` = `test`.`t1`.`b`)) order by `test`.`t1`.`a`,`test`.`t2`.`b`,`test`.`t1`.`a`,`test`.`t1`.`b`
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -1453,16 +1572,18 @@ a b c d a b c d a b c d
4 3 1 2 3 1 1 2 3 1 1 2
4 1 4 5 1 4 2 3 1 4 2 3
4 4 4 4 4 4 4 4 4 4 4 4
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
join t1 as t3 on t3.a = t2.a and t3.b = t2.b
order by t1.a desc,t1.b desc;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL PRIMARY 8 NULL 16 Parent of 3 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 index NULL PRIMARY 8 NULL 16 100.00 Parent of 3 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` where ((`test`.`t2`.`b` = `test`.`t1`.`c`) and (`test`.`t3`.`b` = `test`.`t1`.`c`) and (`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t3`.`a` = `test`.`t1`.`b`)) order by `test`.`t1`.`a` desc,`test`.`t1`.`b` desc
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -1482,16 +1603,18 @@ a b c d a b c d a b c d
1 4 2 3 4 2 5 1 4 2 5 1
1 3 1 2 3 1 1 2 3 1 1 2
1 1 1 1 1 1 1 1 1 1 1 1
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
join t1 as t3 on t3.a = t2.a and t3.b = t2.b
order by t1.b,t1.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 16 Parent of 3 pushed join@1; Using temporary; Using filesort
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 16 100.00 Parent of 3 pushed join@1; Using temporary; Using filesort
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` where ((`test`.`t2`.`b` = `test`.`t1`.`c`) and (`test`.`t3`.`b` = `test`.`t1`.`c`) and (`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t3`.`a` = `test`.`t1`.`b`)) order by `test`.`t1`.`b`,`test`.`t1`.`a`
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -1511,36 +1634,42 @@ a b c d a b c d a b c d
1 4 2 3 4 2 5 1 4 2 5 1
3 4 3 4 4 3 1 2 4 3 1 2
4 4 4 4 4 4 4 4 4 4 4 4
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
join t1 as t3 on t3.a = t2.a and t3.b = t2.b
order by t1.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL PRIMARY 8 NULL 16 Parent of 3 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 Child of pushed join@1; Using where
-explain
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 index NULL PRIMARY 8 NULL 16 100.00 Parent of 3 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` where ((`test`.`t2`.`b` = `test`.`t1`.`c`) and (`test`.`t3`.`b` = `test`.`t1`.`c`) and (`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t3`.`a` = `test`.`t1`.`b`)) order by `test`.`t1`.`a`
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
join t1 as t3 on t3.a = t2.a and t3.b = t2.b
order by t1.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 16 Parent of 3 pushed join@1; Using temporary; Using filesort
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 Child of pushed join@1; Using where
-explain
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 16 100.00 Parent of 3 pushed join@1; Using temporary; Using filesort
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t1`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` where ((`test`.`t2`.`b` = `test`.`t1`.`c`) and (`test`.`t3`.`b` = `test`.`t1`.`c`) and (`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t3`.`a` = `test`.`t1`.`b`)) order by `test`.`t1`.`b`
+explain extended
select t1.a, t1.b, count(*)
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
join t1 as t3 on t3.a = t2.a and t3.b = t2.b
group by t1.a, t1.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL PRIMARY 8 NULL 16 Parent of 3 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 index NULL PRIMARY 8 NULL 16 100.00 Parent of 3 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,count(0) AS `count(*)` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` where ((`test`.`t2`.`b` = `test`.`t1`.`c`) and (`test`.`t3`.`b` = `test`.`t1`.`c`) and (`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t3`.`a` = `test`.`t1`.`b`)) group by `test`.`t1`.`a`,`test`.`t1`.`b`
select t1.a, t1.b, count(*)
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -1560,16 +1689,18 @@ a b count(*)
4 1 1
4 3 1
4 4 1
-explain
+explain extended
select t1.a, count(*)
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
join t1 as t3 on t3.a = t2.a and t3.b = t2.b
group by t1.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index NULL PRIMARY 8 NULL 16 Parent of 3 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 index NULL PRIMARY 8 NULL 16 100.00 Parent of 3 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,count(0) AS `count(*)` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` where ((`test`.`t2`.`b` = `test`.`t1`.`c`) and (`test`.`t3`.`b` = `test`.`t1`.`c`) and (`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t3`.`a` = `test`.`t1`.`b`)) group by `test`.`t1`.`a`
select t1.a, count(*)
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -1580,16 +1711,18 @@ a count(*)
2 3
3 4
4 3
-explain
+explain extended
select t1.b, count(*)
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
join t1 as t3 on t3.a = t2.a and t3.b = t2.b
group by t1.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 16 Parent of 3 pushed join@1; Using temporary; Using filesort
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 16 100.00 Parent of 3 pushed join@1; Using temporary; Using filesort
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t1.c 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 8 test.t1.b,test.t2.b 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select `test`.`t1`.`b` AS `b`,count(0) AS `count(*)` from `test`.`t1` join `test`.`t1` `t2` join `test`.`t1` `t3` where ((`test`.`t2`.`b` = `test`.`t1`.`c`) and (`test`.`t3`.`b` = `test`.`t1`.`c`) and (`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t3`.`a` = `test`.`t1`.`b`)) group by `test`.`t1`.`b`
select t1.b, count(*)
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -1600,15 +1733,19 @@ b count(*)
2 2
3 4
4 3
-explain
+explain extended
select t2.c, count(distinct t2.a)
from t1
join t1 as t2 on t1.a = t2.c and t1.b = t2.d
where t2.a = 4 and t2.b=4
group by t2.c;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 const PRIMARY PRIMARY 8 const,const 1 Using where; Using filesort
-1 SIMPLE t1 eq_ref PRIMARY PRIMARY 8 test.t2.c,test.t2.d 1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 const PRIMARY PRIMARY 8 const,const 1 100.00 Using where; Using filesort
+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 8 test.t2.c,test.t2.d 1 100.00
+Warnings:
+Note 1644 Table 't2' is not pushable: GROUP BY cannot be done using index on grouped columns.
+Note 1644 Table 't1' is not pushable: GROUP BY cannot be done using index on grouped columns.
+Note 1003 select `test`.`t2`.`c` AS `c`,count(distinct `test`.`t2`.`a`) AS `count(distinct t2.a)` from `test`.`t1` join `test`.`t1` `t2` where ((`test`.`t1`.`b` = `test`.`t2`.`d`) and (`test`.`t1`.`a` = `test`.`t2`.`c`) and (`test`.`t2`.`b` = 4) and (`test`.`t2`.`a` = 4)) group by `test`.`t2`.`c`
select t2.c, count(distinct t2.a)
from t1
join t1 as t2 on t1.a = t2.c and t1.b = t2.d
@@ -1616,15 +1753,19 @@ where t2.a = 4 and t2.b=4
group by t2.c;
c count(distinct t2.a)
4 1
-explain
+explain extended
select t2.c, count(distinct t2.a)
from t1
join t1 as t2 on t1.a = t2.c and t1.b = t2.d
where t2.a = 4
group by t2.c;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ref PRIMARY PRIMARY 4 const 10 Using where; Using filesort
-1 SIMPLE t1 eq_ref PRIMARY PRIMARY 8 test.t2.c,test.t2.d 1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 ref PRIMARY PRIMARY 4 const 10 100.00 Using where; Using filesort
+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 8 test.t2.c,test.t2.d 1 100.00
+Warnings:
+Note 1644 Table 't2' is not pushable: GROUP BY cannot be done using index on grouped columns.
+Note 1644 Table 't1' is not pushable: GROUP BY cannot be done using index on grouped columns.
+Note 1003 select `test`.`t2`.`c` AS `c`,count(distinct `test`.`t2`.`a`) AS `count(distinct t2.a)` from `test`.`t1` join `test`.`t1` `t2` where ((`test`.`t1`.`b` = `test`.`t2`.`d`) and (`test`.`t1`.`a` = `test`.`t2`.`c`) and (`test`.`t2`.`a` = 4)) group by `test`.`t2`.`c`
select t2.c, count(distinct t2.a)
from t1
join t1 as t2 on t1.a = t2.c and t1.b = t2.d
@@ -1633,15 +1774,19 @@ group by t2.c;
c count(distinct t2.a)
1 1
4 1
-explain
+explain extended
select t2.c, count(distinct t2.a)
from t1
join t1 as t2 on t1.a = t2.c and t1.b = t2.d
where t2.a = 4 and t2.b=4
group by t2.c order by t2.c;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 const PRIMARY PRIMARY 8 const,const 1 Using where; Using filesort
-1 SIMPLE t1 eq_ref PRIMARY PRIMARY 8 test.t2.c,test.t2.d 1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 const PRIMARY PRIMARY 8 const,const 1 100.00 Using where; Using filesort
+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 8 test.t2.c,test.t2.d 1 100.00
+Warnings:
+Note 1644 Table 't2' is not pushable: GROUP BY cannot be done using index on grouped columns.
+Note 1644 Table 't1' is not pushable: GROUP BY cannot be done using index on grouped columns.
+Note 1003 select `test`.`t2`.`c` AS `c`,count(distinct `test`.`t2`.`a`) AS `count(distinct t2.a)` from `test`.`t1` join `test`.`t1` `t2` where ((`test`.`t1`.`b` = `test`.`t2`.`d`) and (`test`.`t1`.`a` = `test`.`t2`.`c`) and (`test`.`t2`.`b` = 4) and (`test`.`t2`.`a` = 4)) group by `test`.`t2`.`c` order by `test`.`t2`.`c`
select t2.c, count(distinct t2.a)
from t1
join t1 as t2 on t1.a = t2.c and t1.b = t2.d
@@ -1655,14 +1800,16 @@ insert into t1 values (1, 2);
insert into t1 values (2, 3);
insert into t1 values (3, 1);
set ndb_join_pushdown=true;
-explain
+explain extended
select *
from t1, t1 as t2
where t1.a in (1,3,5)
and t2.a = t1.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 66.67 Parent of 2 pushed join@1; Using where with pushed condition: (`test`.`t1`.`a` in (1,3,5))
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` join `test`.`t1` `t2` where ((`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t1`.`a` in (1,3,5)))
select *
from t1, t1 as t2
where t1.a in (1,3,5)
@@ -1676,14 +1823,16 @@ insert into t1 values (1, 2);
insert into t1 values (2, 3);
insert into t1 values (3, 1);
set ndb_join_pushdown=true;
-explain
+explain extended
select *
from t1, t1 as t2
where t1.a in (1,3,5)
and t2.a = t1.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 66.67 Parent of 2 pushed join@1; Using where with pushed condition: (`test`.`t1`.`a` in (1,3,5))
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` join `test`.`t1` `t2` where ((`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t1`.`a` in (1,3,5)))
select *
from t1, t1 as t2
where t1.a in (1,3,5)
@@ -1691,15 +1840,17 @@ and t2.a = t1.b;
a b a b
1 2 2 3
3 1 1 2
-explain
+explain extended
select *
from t1, t1 as t2
where t1.a in (1,3,5)
and t2.a = t1.b
order by t1.a desc;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 100.00 Parent of 2 pushed join@1; Using where with pushed condition: (`test`.`t1`.`a` in (1,3,5))
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` join `test`.`t1` `t2` where ((`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t1`.`a` in (1,3,5))) order by `test`.`t1`.`a` desc
select *
from t1, t1 as t2
where t1.a in (1,3,5)
@@ -1728,30 +1879,34 @@ primary key(a3, b3) using hash) engine =
insert into t3_hash values (0x1f, 0x2f, 1, 0x1f);
insert into t3_hash values (0x2f, 0x3f, 2, 0x2f);
insert into t3_hash values (0x3f, 0x1f, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y, t1 where y.a3=x.d3 and y.b3=x.b3 and t1.a = y.d3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ALL NULL NULL NULL NULL 3 Parent of 3 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d3,test.x.b3 1 Child of pushed join@1
-1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.y.d3 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ALL NULL NULL NULL NULL 3 66.67 Parent of 3 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d3,test.x.b3 1 100.00 Child of pushed join@1
+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.y.d3 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t3` `x` join `test`.`t3` `y` join `test`.`t1` where ((`test`.`t1`.`a` = `test`.`y`.`d3`) and (`test`.`y`.`b3` = `test`.`x`.`b3`) and (`test`.`y`.`a3` = `test`.`x`.`d3`))
select * from t3 x, t3 y, t1 where y.a3=x.d3 and y.b3=x.b3 and t1.a = y.d3;
a3 b3 c3 d3 a3 b3 c3 d3 a b
31 47 1 31 31 47 1 31 31 47
47 63 2 47 47 63 2 47 47 63
63 31 3 63 63 31 3 63 63 31
-explain
+explain extended
select *
from t3 x, t3 y, t3 z, t3 z2, t1
where y.a3=x.d3 and y.b3=x.b3 and
z.a3=y.d3 and z.b3=y.b3 and
z2.a3=z.d3 and z2.b3=z.b3 and
t1.a = z2.d3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ALL NULL NULL NULL NULL 3 Parent of 5 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d3,test.x.b3 1 Child of pushed join@1
-1 SIMPLE z eq_ref PRIMARY PRIMARY 8 test.y.d3,test.x.b3 1 Child of pushed join@1
-1 SIMPLE z2 eq_ref PRIMARY PRIMARY 8 test.z.d3,test.y.b3 1 Child of pushed join@1; Using where
-1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.z2.d3 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ALL NULL NULL NULL NULL 3 100.00 Parent of 5 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d3,test.x.b3 1 100.00 Child of pushed join@1
+1 SIMPLE z eq_ref PRIMARY PRIMARY 8 test.y.d3,test.x.b3 1 100.00 Child of pushed join@1
+1 SIMPLE z2 eq_ref PRIMARY PRIMARY 8 test.z.d3,test.y.b3 1 100.00 Child of pushed join@1; Using where
+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.z2.d3 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3`,`test`.`z`.`a3` AS `a3`,`test`.`z`.`b3` AS `b3`,`test`.`z`.`c3` AS `c3`,`test`.`z`.`d3` AS `d3`,`test`.`z2`.`a3` AS `a3`,`test`.`z2`.`b3` AS `b3`,`test`.`z2`.`c3` AS `c3`,`test`.`z2`.`d3` AS `d3`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t3` `x` join `test`.`t3` `y` join `test`.`t3` `z` join `test`.`t3` `z2` join `test`.`t1` where ((`test`.`t1`.`a` = `test`.`z2`.`d3`) and (`test`.`z2`.`a3` = `test`.`z`.`d3`) and (`test`.`z`.`a3` = `test`.`y`.`d3`) and (`test`.`y`.`b3` = `test`.`x`.`b3`) and (`test`.`z`.`b3` = `test`.`x`.`b3`) and (`test`.`z2`.`b3` = `test`.`x`.`b3`) and (`test`.`y`.`a3` = `test`.`x`.`d3`))
select *
from t3 x, t3 y, t3 z, t3 z2, t1
where y.a3=x.d3 and y.b3=x.b3 and
@@ -1762,96 +1917,118 @@ a3 b3 c3 d3 a3 b3 c3 d3 a3 b3 c3 d3 a3 b
31 47 1 31 31 47 1 31 31 47 1 31 31 47 1 31 31 47
47 63 2 47 47 63 2 47 47 63 2 47 47 63 2 47 47 63
63 31 3 63 63 31 3 63 63 31 3 63 63 31 3 63 63 31
-explain
+explain extended
select straight_join * from t1 x, t1 y where y.a=0x1f and x.b = 0x1f;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ALL NULL NULL NULL NULL 3 Using where with pushed condition
-1 SIMPLE y const PRIMARY PRIMARY 4 const 1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ALL NULL NULL NULL NULL 3 66.67 Using where with pushed condition: (`test`.`x`.`b` = 0x1f)
+1 SIMPLE y const PRIMARY PRIMARY 4 const 1 100.00
+Warnings:
+Note 1644 Can't push table 'y' as child of 'x', their dependency is 'const'
+Note 1003 select straight_join `test`.`x`.`a` AS `a`,`test`.`x`.`b` AS `b`,`test`.`y`.`a` AS `a`,`test`.`y`.`b` AS `b` from `test`.`t1` `x` join `test`.`t1` `y` where ((`test`.`y`.`a` = 0x1f) and (`test`.`x`.`b` = 0x1f))
select straight_join * from t1 x, t1 y where y.a=0x1f and x.b = 0x1f;
a b a b
63 31 31 47
-explain
+explain extended
select straight_join * from t1 x, t1 y where y.a=x.b and x.b = 0x1f;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ALL NULL NULL NULL NULL 3 Using where with pushed condition
-1 SIMPLE y const PRIMARY PRIMARY 4 const 1 Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ALL NULL NULL NULL NULL 3 100.00 Using where with pushed condition: (`test`.`x`.`b` = 0x1f)
+1 SIMPLE y const PRIMARY PRIMARY 4 const 1 100.00 Using where
+Warnings:
+Note 1644 Can't push table 'y' as child of 'x', their dependency is 'const'
+Note 1003 select straight_join `test`.`x`.`a` AS `a`,`test`.`x`.`b` AS `b`,`test`.`y`.`a` AS `a`,`test`.`y`.`b` AS `b` from `test`.`t1` `x` join `test`.`t1` `y` where ((`test`.`y`.`a` = `test`.`x`.`b`) and (`test`.`x`.`b` = 0x1f))
select straight_join * from t1 x, t1 y where y.a=x.b and x.b = 0x1f;
a b a b
63 31 31 47
create unique index t3_d3 on t3(d3);
create unique index t3_d3 on t3_hash(d3);
commit;
-explain
+explain extended
select * from t3 x, t3 y where x.d3=31 and y.a3=x.d3 and y.b3=x.b3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x const t3_d3 t3_d3 4 const 1 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 8 const,test.x.b3 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x const t3_d3 t3_d3 4 const 1 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 8 const,test.x.b3 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = `test`.`x`.`b3`) and (`test`.`x`.`d3` = 31) and (`test`.`y`.`a3` = 31))
select * from t3 x, t3 y where x.d3=31 and y.a3=x.d3 and y.b3=x.b3;
a3 b3 c3 d3 a3 b3 c3 d3
31 47 1 31 31 47 1 31
-explain
+explain extended
select * from t3 x, t3 y where x.d3=0 and y.a3=x.d3 and y.b3=x.b3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x const t3_d3 t3_d3 4 const 1 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 8 const,test.x.b3 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x const t3_d3 t3_d3 4 const 1 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 8 const,test.x.b3 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = `test`.`x`.`b3`) and (`test`.`x`.`d3` = 0) and (`test`.`y`.`a3` = 0))
select * from t3 x, t3 y where x.d3=0 and y.a3=x.d3 and y.b3=x.b3;
a3 b3 c3 d3 a3 b3 c3 d3
-explain
+explain extended
select * from t1 x, t3 y where y.d3=x.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ALL NULL NULL NULL NULL 3 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref t3_d3 t3_d3 4 test.x.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ALL NULL NULL NULL NULL 3 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref t3_d3 t3_d3 4 test.x.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a` AS `a`,`test`.`x`.`b` AS `b`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t1` `x` join `test`.`t3` `y` where (`test`.`y`.`d3` = `test`.`x`.`b`)
select * from t1 x, t3 y where y.d3=x.b;
a b a3 b3 c3 d3
31 47 47 63 2 47
47 63 63 31 3 63
63 31 31 47 1 31
-explain
+explain extended
select * from t3 x, t3 y where x.d3=31 and y.d3=x.b3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x const t3_d3 t3_d3 4 const 1 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref t3_d3 t3_d3 4 test.x.b3 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x const t3_d3 t3_d3 4 const 1 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref t3_d3 t3_d3 4 test.x.b3 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`d3` = `test`.`x`.`b3`) and (`test`.`x`.`d3` = 31))
select * from t3 x, t3 y where x.d3=31 and y.d3=x.b3;
a3 b3 c3 d3 a3 b3 c3 d3
31 47 1 31 47 63 2 47
-explain
+explain extended
select * from t3 x, t3 y where x.d3=31 and y.d3=x.c3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x const t3_d3 t3_d3 4 const 1 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref t3_d3 t3_d3 4 test.x.c3 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x const t3_d3 t3_d3 4 const 1 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref t3_d3 t3_d3 4 test.x.c3 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`d3` = `test`.`x`.`c3`) and (`test`.`x`.`d3` = 31))
select * from t3 x, t3 y where x.d3=31 and y.d3=x.c3;
a3 b3 c3 d3 a3 b3 c3 d3
-explain
+explain extended
select * from t3 x, t3 y
where ((x.a3=0x2f and x.b3=0x3f) or x.d3=0x1f)
and (y.a3=x.d3 and y.b3=x.b3);
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x index_merge PRIMARY,t3_d3 t3_d3,PRIMARY 4,8 NULL 2 Parent of 2 pushed join@1; Using sort_union(t3_d3,PRIMARY); Using where with pushed condition
-1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d3,test.x.b3 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x index_merge PRIMARY,t3_d3 t3_d3,PRIMARY 4,8 NULL 2 100.00 Parent of 2 pushed join@1; Using sort_union(t3_d3,PRIMARY); Using where with pushed condition: (((`test`.`x`.`a3` = 0x2f) and (`test`.`x`.`b3` = 0x3f)) or (`test`.`x`.`d3` = 0x1f))
+1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d3,test.x.b3 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = `test`.`x`.`b3`) and (`test`.`y`.`a3` = `test`.`x`.`d3`) and (((`test`.`x`.`a3` = 0x2f) and (`test`.`x`.`b3` = 0x3f)) or (`test`.`x`.`d3` = 0x1f)))
select * from t3 x, t3 y
where ((x.a3=0x2f and x.b3=0x3f) or x.d3=0x1f)
and (y.a3=x.d3 and y.b3=x.b3);
a3 b3 c3 d3 a3 b3 c3 d3
31 47 1 31 31 47 1 31
47 63 2 47 47 63 2 47
-explain
+explain extended
select * from t3_hash x, t3_hash y
where ((x.a3=0x2f and x.b3=0x3f) or x.d3=0x1f)
and (y.a3=x.d3 and y.b3=x.b3);
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x index_merge PRIMARY,t3_d3 PRIMARY,t3_d3 8,4 NULL 2 Parent of 2 pushed join@1; Using sort_union(PRIMARY,t3_d3); Using where with pushed condition
-1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d3,test.x.b3 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x index_merge PRIMARY,t3_d3 PRIMARY,t3_d3 8,4 NULL 2 100.00 Parent of 2 pushed join@1; Using sort_union(PRIMARY,t3_d3); Using where with pushed condition: (((`test`.`x`.`a3` = 0x2f) and (`test`.`x`.`b3` = 0x3f)) or (`test`.`x`.`d3` = 0x1f))
+1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d3,test.x.b3 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3_hash` `x` join `test`.`t3_hash` `y` where ((`test`.`y`.`b3` = `test`.`x`.`b3`) and (`test`.`y`.`a3` = `test`.`x`.`d3`) and (((`test`.`x`.`a3` = 0x2f) and (`test`.`x`.`b3` = 0x3f)) or (`test`.`x`.`d3` = 0x1f)))
select * from t3_hash x, t3_hash y
where ((x.a3=0x2f and x.b3=0x3f) or x.d3=0x1f)
and (y.a3=x.d3 and y.b3=x.b3);
a3 b3 c3 d3 a3 b3 c3 d3
31 47 1 31 31 47 1 31
47 63 2 47 47 63 2 47
-explain
+explain extended
select * from t3 x, t3 y where x.d3>=31 and y.d3=x.b3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x range t3_d3 t3_d3 4 NULL 1 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE y eq_ref t3_d3 t3_d3 4 test.x.b3 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x range t3_d3 t3_d3 4 NULL 1 100.00 Parent of 2 pushed join@1; Using where with pushed condition: (`test`.`x`.`d3` >= 31)
+1 SIMPLE y eq_ref t3_d3 t3_d3 4 test.x.b3 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`d3` = `test`.`x`.`b3`) and (`test`.`x`.`d3` >= 31))
select * from t3 x, t3 y where x.d3>=31 and y.d3=x.b3;
a3 b3 c3 d3 a3 b3 c3 d3
31 47 1 31 47 63 2 47
@@ -1880,31 +2057,37 @@ primary key(pk) using hash, unique key(b
insert into t3_unq values (1001, 0x1f, 0x2f, 1, 0x1f);
insert into t3_unq values (1002, 0x2f, 0x3f, 2, 0x2f);
insert into t3_unq values (1003, 0x3f, 0x1f, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where y.a3=x.d3 and y.b3=x.b3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ALL PRIMARY NULL NULL NULL 3 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.b3,test.x.d3 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ALL PRIMARY NULL NULL NULL 3 66.67 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.b3,test.x.d3 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = `test`.`x`.`b3`) and (`test`.`y`.`a3` = `test`.`x`.`d3`))
select * from t3 x, t3 y where y.a3=x.d3 and y.b3=x.b3;
a3 b3 c3 d3 a3 b3 c3 d3
31 47 1 31 31 47 1 31
47 63 2 47 47 63 2 47
63 31 3 63 63 31 3 63
-explain
+explain extended
select * from t3_hash x, t3_hash y where y.a3=x.d3 and y.b3=x.b3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ALL PRIMARY NULL NULL NULL 3 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.b3,test.x.d3 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ALL PRIMARY NULL NULL NULL 3 66.67 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.b3,test.x.d3 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3_hash` `x` join `test`.`t3_hash` `y` where ((`test`.`y`.`b3` = `test`.`x`.`b3`) and (`test`.`y`.`a3` = `test`.`x`.`d3`))
select * from t3_hash x, t3_hash y where y.a3=x.d3 and y.b3=x.b3;
a3 b3 c3 d3 a3 b3 c3 d3
31 47 1 31 31 47 1 31
47 63 2 47 47 63 2 47
63 31 3 63 63 31 3 63
-explain
+explain extended
select * from t3_unq x, t3_unq y where y.a3=x.d3 and y.b3=x.b3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ALL b3 NULL NULL NULL 3 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref b3 b3 8 test.x.b3,test.x.d3 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ALL b3 NULL NULL NULL 3 66.67 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref b3 b3 8 test.x.b3,test.x.d3 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`pk` AS `pk`,`test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`pk` AS `pk`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3_unq` `x` join `test`.`t3_unq` `y` where ((`test`.`y`.`b3` = `test`.`x`.`b3`) and (`test`.`y`.`a3` = `test`.`x`.`d3`))
select * from t3_unq x, t3_unq y where y.a3=x.d3 and y.b3=x.b3;
pk a3 b3 c3 d3 pk a3 b3 c3 d3
1001 31 47 1 31 1001 31 47 1 31
@@ -1917,14 +2100,16 @@ insert into t3 values (0x1f, 0x2f, 1, 0x
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
insert into t3 values (0x4f, 0, NULL, NULL);
-explain
+explain extended
select * from t3 as t1
left outer join t3 as t2 on t2.d3 = t1.d3
left outer join t3 as t3 on t3.a3 = t2.d3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Parent of 3 pushed join@1
-1 SIMPLE t2 ref d3 d3 5 test.t1.d3 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.d3 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 4 50.00 Parent of 3 pushed join@1
+1 SIMPLE t2 ref d3 d3 5 test.t1.d3 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.d3 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a3` AS `a3`,`test`.`t1`.`b3` AS `b3`,`test`.`t1`.`c3` AS `c3`,`test`.`t1`.`d3` AS `d3`,`test`.`t2`.`a3` AS `a3`,`test`.`t2`.`b3` AS `b3`,`test`.`t2`.`c3` AS `c3`,`test`.`t2`.`d3` AS `d3`,`test`.`t3`.`a3` AS `a3`,`test`.`t3`.`b3` AS `b3`,`test`.`t3`.`c3` AS `c3`,`test`.`t3`.`d3` AS `d3` from `test`.`t3` `t1` left join `test`.`t3` `t2` on((`test`.`t2`.`d3` = `test`.`t1`.`d3`)) left join `test`.`t3` on((`test`.`t3`.`a3` = `test`.`t2`.`d3`)) where 1
select * from t3 as t1
left outer join t3 as t2 on t2.d3 = t1.d3
left outer join t3 as t3 on t3.a3 = t2.d3;
@@ -1933,30 +2118,34 @@ a3 b3 c3 d3 a3 b3 c3 d3 a3 b3 c3 d3
47 63 2 47 47 63 2 47 47 63 2 47
63 31 3 63 63 31 3 63 63 31 3 63
79 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
-explain
+explain extended
select * from t3 as t1
left outer join t3 as t2 on t2.d3 = t1.a3
left outer join t3 as t3 on t3.a3 = t2.d3
where t1.d3 = 47;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref d3 d3 5 const 1 Parent of 3 pushed join@1; Using where with pushed condition
-1 SIMPLE t2 ref d3 d3 5 test.t1.a3 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.d3 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ref d3 d3 5 const 1 100.00 Parent of 3 pushed join@1; Using where with pushed condition: (`test`.`t1`.`d3` = 47)
+1 SIMPLE t2 ref d3 d3 5 test.t1.a3 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.d3 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a3` AS `a3`,`test`.`t1`.`b3` AS `b3`,`test`.`t1`.`c3` AS `c3`,`test`.`t1`.`d3` AS `d3`,`test`.`t2`.`a3` AS `a3`,`test`.`t2`.`b3` AS `b3`,`test`.`t2`.`c3` AS `c3`,`test`.`t2`.`d3` AS `d3`,`test`.`t3`.`a3` AS `a3`,`test`.`t3`.`b3` AS `b3`,`test`.`t3`.`c3` AS `c3`,`test`.`t3`.`d3` AS `d3` from `test`.`t3` `t1` left join `test`.`t3` `t2` on((`test`.`t2`.`d3` = `test`.`t1`.`a3`)) left join `test`.`t3` on((`test`.`t3`.`a3` = `test`.`t2`.`d3`)) where (`test`.`t1`.`d3` = 47)
select * from t3 as t1
left outer join t3 as t2 on t2.d3 = t1.a3
left outer join t3 as t3 on t3.a3 = t2.d3
where t1.d3 = 47;
a3 b3 c3 d3 a3 b3 c3 d3 a3 b3 c3 d3
47 63 2 47 47 63 2 47 47 63 2 47
-explain
+explain extended
select * from t3 as t1
left outer join t3 as t2 on t2.d3 = t1.a3
left outer join t3 as t3 on t3.a3 = t2.d3
where t1.d3 >= 47;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range d3 d3 5 NULL 1 Parent of 3 pushed join@1; Using where with pushed condition
-1 SIMPLE t2 ref d3 d3 5 test.t1.a3 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.d3 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 range d3 d3 5 NULL 1 100.00 Parent of 3 pushed join@1; Using where with pushed condition: (`test`.`t1`.`d3` >= 47)
+1 SIMPLE t2 ref d3 d3 5 test.t1.a3 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.d3 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a3` AS `a3`,`test`.`t1`.`b3` AS `b3`,`test`.`t1`.`c3` AS `c3`,`test`.`t1`.`d3` AS `d3`,`test`.`t2`.`a3` AS `a3`,`test`.`t2`.`b3` AS `b3`,`test`.`t2`.`c3` AS `c3`,`test`.`t2`.`d3` AS `d3`,`test`.`t3`.`a3` AS `a3`,`test`.`t3`.`b3` AS `b3`,`test`.`t3`.`c3` AS `c3`,`test`.`t3`.`d3` AS `d3` from `test`.`t3` `t1` left join `test`.`t3` `t2` on((`test`.`t2`.`d3` = `test`.`t1`.`a3`)) left join `test`.`t3` on((`test`.`t3`.`a3` = `test`.`t2`.`d3`)) where (`test`.`t1`.`d3` >= 47)
select * from t3 as t1
left outer join t3 as t2 on t2.d3 = t1.a3
left outer join t3 as t3 on t3.a3 = t2.d3
@@ -1964,30 +2153,34 @@ where t1.d3 >= 47;
a3 b3 c3 d3 a3 b3 c3 d3 a3 b3 c3 d3
47 63 2 47 47 63 2 47 47 63 2 47
63 31 3 63 63 31 3 63 63 31 3 63
-explain
+explain extended
select * from t3 as t1
left outer join t3 as t2 on t2.d3 = t1.a3
left outer join t3 as t3 on t3.a3 = t2.d3
where t1.d3 is NULL;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref d3 d3 5 const 1 Parent of 3 pushed join@1; Using where with pushed condition
-1 SIMPLE t2 ref d3 d3 5 test.t1.a3 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.d3 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ref d3 d3 5 const 1 100.00 Parent of 3 pushed join@1; Using where with pushed condition: isnull(`test`.`t1`.`d3`)
+1 SIMPLE t2 ref d3 d3 5 test.t1.a3 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.d3 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a3` AS `a3`,`test`.`t1`.`b3` AS `b3`,`test`.`t1`.`c3` AS `c3`,`test`.`t1`.`d3` AS `d3`,`test`.`t2`.`a3` AS `a3`,`test`.`t2`.`b3` AS `b3`,`test`.`t2`.`c3` AS `c3`,`test`.`t2`.`d3` AS `d3`,`test`.`t3`.`a3` AS `a3`,`test`.`t3`.`b3` AS `b3`,`test`.`t3`.`c3` AS `c3`,`test`.`t3`.`d3` AS `d3` from `test`.`t3` `t1` left join `test`.`t3` `t2` on((`test`.`t2`.`d3` = `test`.`t1`.`a3`)) left join `test`.`t3` on((`test`.`t3`.`a3` = `test`.`t2`.`d3`)) where isnull(`test`.`t1`.`d3`)
select * from t3 as t1
left outer join t3 as t2 on t2.d3 = t1.a3
left outer join t3 as t3 on t3.a3 = t2.d3
where t1.d3 is NULL;
a3 b3 c3 d3 a3 b3 c3 d3 a3 b3 c3 d3
79 0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
-explain
+explain extended
select * from t3 as t1
left outer join t3 as t2 on t2.d3 = t1.a3
left outer join t3 as t3 on t3.a3 = t2.d3
where t1.d3 is not NULL;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range d3 d3 5 NULL 1 Parent of 3 pushed join@1; Using where with pushed condition
-1 SIMPLE t2 ref d3 d3 5 test.t1.a3 1 Child of pushed join@1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.d3 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 range d3 d3 5 NULL 1 100.00 Parent of 3 pushed join@1; Using where with pushed condition: (`test`.`t1`.`d3` is not null)
+1 SIMPLE t2 ref d3 d3 5 test.t1.a3 1 100.00 Child of pushed join@1
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.d3 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a3` AS `a3`,`test`.`t1`.`b3` AS `b3`,`test`.`t1`.`c3` AS `c3`,`test`.`t1`.`d3` AS `d3`,`test`.`t2`.`a3` AS `a3`,`test`.`t2`.`b3` AS `b3`,`test`.`t2`.`c3` AS `c3`,`test`.`t2`.`d3` AS `d3`,`test`.`t3`.`a3` AS `a3`,`test`.`t3`.`b3` AS `b3`,`test`.`t3`.`c3` AS `c3`,`test`.`t3`.`d3` AS `d3` from `test`.`t3` `t1` left join `test`.`t3` `t2` on((`test`.`t2`.`d3` = `test`.`t1`.`a3`)) left join `test`.`t3` on((`test`.`t3`.`a3` = `test`.`t2`.`d3`)) where (`test`.`t1`.`d3` is not null)
select * from t3 as t1
left outer join t3 as t2 on t2.d3 = t1.a3
left outer join t3 as t3 on t3.a3 = t2.d3
@@ -2006,12 +2199,14 @@ insert into t3 values (0x40, 0, NULL,
insert into t3 values (0x41, 0, NULL, NULL);
insert into t3 values (0x42, 0, 4, NULL);
insert into t3 values (0x43, 0, NULL, 0x43);
-explain
+explain extended
select straight_join *
from t3 as X JOIN t3 as Y on X.b3 = Y.b3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE X ALL b3 NULL NULL NULL 7 Parent of 2 pushed join@1
-1 SIMPLE Y ref b3 b3 4 test.X.b3 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE X ALL b3 NULL NULL NULL 7 28.57 Parent of 2 pushed join@1
+1 SIMPLE Y ref b3 b3 4 test.X.b3 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select straight_join `test`.`X`.`a3` AS `a3`,`test`.`X`.`b3` AS `b3`,`test`.`X`.`c3` AS `c3`,`test`.`X`.`d3` AS `d3`,`test`.`Y`.`a3` AS `a3`,`test`.`Y`.`b3` AS `b3`,`test`.`Y`.`c3` AS `c3`,`test`.`Y`.`d3` AS `d3` from `test`.`t3` `X` join `test`.`t3` `Y` where (`test`.`Y`.`b3` = `test`.`X`.`b3`)
select straight_join *
from t3 as X JOIN t3 as Y on X.b3 = Y.b3;
a3 b3 c3 d3 a3 b3 c3 d3
@@ -2034,60 +2229,70 @@ a3 b3 c3 d3 a3 b3 c3 d3
67 0 NULL 67 65 0 NULL NULL
67 0 NULL 67 66 0 4 NULL
67 0 NULL 67 67 0 NULL 67
-explain
+explain extended
select straight_join *
from t3 as X JOIN t3 as Y on X.b3 = Y.b3
where Y.d3 = 0x2f;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE X ALL b3 NULL NULL NULL 7 Parent of 2 pushed join@1
-1 SIMPLE Y ref b3 b3 9 test.X.b3,const 1 Child of pushed join@1; Using where with pushed condition
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE X ALL b3 NULL NULL NULL 7 100.00 Parent of 2 pushed join@1
+1 SIMPLE Y ref b3 b3 9 test.X.b3,const 1 100.00 Child of pushed join@1; Using where with pushed condition: (`test`.`Y`.`d3` = 0x2f)
+Warnings:
+Note 1003 select straight_join `test`.`X`.`a3` AS `a3`,`test`.`X`.`b3` AS `b3`,`test`.`X`.`c3` AS `c3`,`test`.`X`.`d3` AS `d3`,`test`.`Y`.`a3` AS `a3`,`test`.`Y`.`b3` AS `b3`,`test`.`Y`.`c3` AS `c3`,`test`.`Y`.`d3` AS `d3` from `test`.`t3` `X` join `test`.`t3` `Y` where ((`test`.`Y`.`b3` = `test`.`X`.`b3`) and (`test`.`Y`.`d3` = 0x2f))
select straight_join *
from t3 as X JOIN t3 as Y on X.b3 = Y.b3
where Y.d3 = 0x2f;
a3 b3 c3 d3 a3 b3 c3 d3
47 63 2 47 47 63 2 47
-explain
+explain extended
select straight_join *
from t3 as X JOIN t3 as Y on X.c3 = Y.c3
where Y.d3 = 0x2f;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE X ALL c3,c3_2 NULL NULL NULL 7 Parent of 2 pushed join@1
-1 SIMPLE Y ref c3,c3_2 c3 5 test.X.c3 1 Child of pushed join@1; Using where with pushed condition
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE X ALL c3,c3_2 NULL NULL NULL 7 100.00 Parent of 2 pushed join@1
+1 SIMPLE Y ref c3,c3_2 c3 5 test.X.c3 1 100.00 Child of pushed join@1; Using where with pushed condition: (`test`.`Y`.`d3` = 0x2f)
+Warnings:
+Note 1003 select straight_join `test`.`X`.`a3` AS `a3`,`test`.`X`.`b3` AS `b3`,`test`.`X`.`c3` AS `c3`,`test`.`X`.`d3` AS `d3`,`test`.`Y`.`a3` AS `a3`,`test`.`Y`.`b3` AS `b3`,`test`.`Y`.`c3` AS `c3`,`test`.`Y`.`d3` AS `d3` from `test`.`t3` `X` join `test`.`t3` `Y` where ((`test`.`Y`.`c3` = `test`.`X`.`c3`) and (`test`.`Y`.`d3` = 0x2f))
select straight_join *
from t3 as X JOIN t3 as Y on X.c3 = Y.c3
where Y.d3 = 0x2f;
a3 b3 c3 d3 a3 b3 c3 d3
47 63 2 47 47 63 2 47
-explain
+explain extended
select straight_join *
from t3 as X JOIN t3 as Y on X.d3 = Y.d3
where Y.b3 = 0x2f;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE X ALL NULL NULL NULL NULL 7 Parent of 2 pushed join@1
-1 SIMPLE Y ref b3 b3 9 const,test.X.d3 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE X ALL NULL NULL NULL NULL 7 100.00 Parent of 2 pushed join@1
+1 SIMPLE Y ref b3 b3 9 const,test.X.d3 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select straight_join `test`.`X`.`a3` AS `a3`,`test`.`X`.`b3` AS `b3`,`test`.`X`.`c3` AS `c3`,`test`.`X`.`d3` AS `d3`,`test`.`Y`.`a3` AS `a3`,`test`.`Y`.`b3` AS `b3`,`test`.`Y`.`c3` AS `c3`,`test`.`Y`.`d3` AS `d3` from `test`.`t3` `X` join `test`.`t3` `Y` where ((`test`.`Y`.`d3` = `test`.`X`.`d3`) and (`test`.`Y`.`b3` = 0x2f))
select straight_join *
from t3 as X JOIN t3 as Y on X.d3 = Y.d3
where Y.b3 = 0x2f;
a3 b3 c3 d3 a3 b3 c3 d3
31 47 1 31 31 47 1 31
-explain
+explain extended
select straight_join *
from t3 as X JOIN t3 as Y on X.d3 = Y.d3
where Y.b3 = 0x20+0x2f;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE X ALL NULL NULL NULL NULL 7 Parent of 2 pushed join@1
-1 SIMPLE Y ref b3 b3 9 const,test.X.d3 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE X ALL NULL NULL NULL NULL 7 100.00 Parent of 2 pushed join@1
+1 SIMPLE Y ref b3 b3 9 const,test.X.d3 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select straight_join `test`.`X`.`a3` AS `a3`,`test`.`X`.`b3` AS `b3`,`test`.`X`.`c3` AS `c3`,`test`.`X`.`d3` AS `d3`,`test`.`Y`.`a3` AS `a3`,`test`.`Y`.`b3` AS `b3`,`test`.`Y`.`c3` AS `c3`,`test`.`Y`.`d3` AS `d3` from `test`.`t3` `X` join `test`.`t3` `Y` where ((`test`.`Y`.`d3` = `test`.`X`.`d3`) and (`test`.`Y`.`b3` = (0x20 + 0x2f)))
select straight_join *
from t3 as X JOIN t3 as Y on X.d3 = Y.d3
where Y.b3 = 0x20+0x2f;
a3 b3 c3 d3 a3 b3 c3 d3
-explain
+explain extended
select straight_join *
from t3 as X JOIN t3 as Y on X.b3 = Y.b3
where Y.d3 is not NULL;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE X ALL b3 NULL NULL NULL 7 Parent of 2 pushed join@1
-1 SIMPLE Y ref b3 b3 4 test.X.b3 1 Child of pushed join@1; Using where with pushed condition
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE X ALL b3 NULL NULL NULL 7 100.00 Parent of 2 pushed join@1
+1 SIMPLE Y ref b3 b3 4 test.X.b3 1 100.00 Child of pushed join@1; Using where with pushed condition: (`test`.`Y`.`d3` is not null)
+Warnings:
+Note 1003 select straight_join `test`.`X`.`a3` AS `a3`,`test`.`X`.`b3` AS `b3`,`test`.`X`.`c3` AS `c3`,`test`.`X`.`d3` AS `d3`,`test`.`Y`.`a3` AS `a3`,`test`.`Y`.`b3` AS `b3`,`test`.`Y`.`c3` AS `c3`,`test`.`Y`.`d3` AS `d3` from `test`.`t3` `X` join `test`.`t3` `Y` where ((`test`.`Y`.`b3` = `test`.`X`.`b3`) and (`test`.`Y`.`d3` is not null))
select straight_join *
from t3 as X JOIN t3 as Y on X.b3 = Y.b3
where Y.d3 is not NULL;
@@ -2099,13 +2304,15 @@ a3 b3 c3 d3 a3 b3 c3 d3
65 0 NULL NULL 67 0 NULL 67
66 0 4 NULL 67 0 NULL 67
67 0 NULL 67 67 0 NULL 67
-explain
+explain extended
select straight_join *
from t3 as X JOIN t3 as Y on X.b3 = Y.b3
where Y.d3 is NULL;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE X ALL b3 NULL NULL NULL 7
-1 SIMPLE Y ref b3 b3 9 test.X.b3,const 1 Using where with pushed condition
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE X ALL b3 NULL NULL NULL 7 100.00
+1 SIMPLE Y ref b3 b3 9 test.X.b3,const 1 100.00 Using where with pushed condition: isnull(`test`.`Y`.`d3`)
+Warnings:
+Note 1003 select straight_join `test`.`X`.`a3` AS `a3`,`test`.`X`.`b3` AS `b3`,`test`.`X`.`c3` AS `c3`,`test`.`X`.`d3` AS `d3`,`test`.`Y`.`a3` AS `a3`,`test`.`Y`.`b3` AS `b3`,`test`.`Y`.`c3` AS `c3`,`test`.`Y`.`d3` AS `d3` from `test`.`t3` `X` join `test`.`t3` `Y` where ((`test`.`Y`.`b3` = `test`.`X`.`b3`) and isnull(`test`.`Y`.`d3`))
select straight_join *
from t3 as X JOIN t3 as Y on X.b3 = Y.b3
where Y.d3 is NULL;
@@ -2122,39 +2329,45 @@ a3 b3 c3 d3 a3 b3 c3 d3
67 0 NULL 67 64 0 NULL NULL
67 0 NULL 67 65 0 NULL NULL
67 0 NULL 67 66 0 4 NULL
-explain
+explain extended
select straight_join *
from t3 as X JOIN t3 as Y on X.c3 = Y.c3
where Y.b3 = 0;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE X ALL c3,c3_2 NULL NULL NULL 7 Parent of 2 pushed join@1
-1 SIMPLE Y ref b3,c3,c3_2 c3 9 test.X.c3,const 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE X ALL c3,c3_2 NULL NULL NULL 7 100.00 Parent of 2 pushed join@1
+1 SIMPLE Y ref b3,c3,c3_2 c3 9 test.X.c3,const 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select straight_join `test`.`X`.`a3` AS `a3`,`test`.`X`.`b3` AS `b3`,`test`.`X`.`c3` AS `c3`,`test`.`X`.`d3` AS `d3`,`test`.`Y`.`a3` AS `a3`,`test`.`Y`.`b3` AS `b3`,`test`.`Y`.`c3` AS `c3`,`test`.`Y`.`d3` AS `d3` from `test`.`t3` `X` join `test`.`t3` `Y` where ((`test`.`Y`.`c3` = `test`.`X`.`c3`) and (`test`.`Y`.`b3` = 0))
select straight_join *
from t3 as X JOIN t3 as Y on X.c3 = Y.c3
where Y.b3 = 0;
a3 b3 c3 d3 a3 b3 c3 d3
66 0 4 NULL 66 0 4 NULL
-explain
+explain extended
select straight_join *
from t3 as X JOIN t3 as Y on X.c3 = Y.c3
where Y.b3 is NULL;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+Warnings:
+Note 1003 select straight_join `test`.`X`.`a3` AS `a3`,`test`.`X`.`b3` AS `b3`,`test`.`X`.`c3` AS `c3`,`test`.`X`.`d3` AS `d3`,`test`.`Y`.`a3` AS `a3`,`test`.`Y`.`b3` AS `b3`,`test`.`Y`.`c3` AS `c3`,`test`.`Y`.`d3` AS `d3` from `test`.`t3` `X` join `test`.`t3` `Y` where 0
select straight_join *
from t3 as X JOIN t3 as Y on X.c3 = Y.c3
where Y.b3 is NULL;
a3 b3 c3 d3 a3 b3 c3 d3
-explain
+explain extended
select straight_join * from
t3 as X1
JOIN t3 as Y1 on X1.b3 = Y1.b3 and X1.d3 = Y1.d3
JOIN t3 as X2 on X2.b3 = Y1.b3
JOIN t3 as Y2 on Y2.b3 = X2.c3 and Y2.d3 = X1.c3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE X1 ALL b3,c3,c3_2 NULL NULL NULL 7 Parent of 4 pushed join@1
-1 SIMPLE Y1 ref b3 b3 9 test.X1.b3,test.X1.d3 1 Child of pushed join@1; Using where
-1 SIMPLE X2 ref b3,c3,c3_2 b3 4 test.X1.b3 1 Child of pushed join@1
-1 SIMPLE Y2 ref b3 b3 9 test.X2.c3,test.X1.c3 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE X1 ALL b3,c3,c3_2 NULL NULL NULL 7 100.00 Parent of 4 pushed join@1
+1 SIMPLE Y1 ref b3 b3 9 test.X1.b3,test.X1.d3 1 100.00 Child of pushed join@1; Using where
+1 SIMPLE X2 ref b3,c3,c3_2 b3 4 test.X1.b3 1 100.00 Child of pushed join@1
+1 SIMPLE Y2 ref b3 b3 9 test.X2.c3,test.X1.c3 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select straight_join `test`.`X1`.`a3` AS `a3`,`test`.`X1`.`b3` AS `b3`,`test`.`X1`.`c3` AS `c3`,`test`.`X1`.`d3` AS `d3`,`test`.`Y1`.`a3` AS `a3`,`test`.`Y1`.`b3` AS `b3`,`test`.`Y1`.`c3` AS `c3`,`test`.`Y1`.`d3` AS `d3`,`test`.`X2`.`a3` AS `a3`,`test`.`X2`.`b3` AS `b3`,`test`.`X2`.`c3` AS `c3`,`test`.`X2`.`d3` AS `d3`,`test`.`Y2`.`a3` AS `a3`,`test`.`Y2`.`b3` AS `b3`,`test`.`Y2`.`c3` AS `c3`,`test`.`Y2`.`d3` AS `d3` from `test`.`t3` `X1` join `test`.`t3` `Y1` join `test`.`t3` `X2` join `test`.`t3` `Y2` where ((`test`.`Y1`.`d3` = `test`.`X1`.`d3`) and (`test`.`Y1`.`b3` = `test`.`X1`.`b3`) and (`test`.`X2`.`b3` = `test`.`X1`.`b3`) and (`test`.`Y2`.`d3` = `test`.`X1`.`c3`) and (`test`.`Y2`.`b3` = `test`.`X2`.`c3`))
select straight_join * from
t3 as X1
JOIN t3 as Y1 on X1.b3 = Y1.b3 and X1.d3 = Y1.d3
@@ -2330,15 +2543,17 @@ a b c a b c a b c a b c
5 1 NULL 5 1 NULL 5 1 NULL 1 NULL 2
6 2 2 3 2 2 3 2 2 2 1 NULL
6 2 2 6 2 2 6 2 2 2 1 NULL
-explain
+explain extended
select *
from t1 where b in
(select x.a from t1 as x join t1 as y on (y.a = x.b))
xor c > 5;
-id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 6 Using where
-2 DEPENDENT SUBQUERY x eq_ref PRIMARY,b PRIMARY 4 func 1 Parent of 2 pushed join@1; Using where; Full scan on NULL key
-2 DEPENDENT SUBQUERY y eq_ref PRIMARY PRIMARY 4 test.x.b 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00 Using where
+2 DEPENDENT SUBQUERY x eq_ref PRIMARY,b PRIMARY 4 func 1 100.00 Parent of 2 pushed join@1; Using where; Full scan on NULL key
+2 DEPENDENT SUBQUERY y eq_ref PRIMARY PRIMARY 4 test.x.b 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` where (<in_optimizer>(`test`.`t1`.`b`,<exists>(select 1 from `test`.`t1` `x` join `test`.`t1` `y` where ((`test`.`y`.`a` = `test`.`x`.`b`) and trigcond((<cache>(`test`.`t1`.`b`) = `test`.`x`.`a`))))) xor (`test`.`t1`.`c` > 5))
select *
from t1 where b in
(select x.a from t1 as x join t1 as y on (y.a = x.b))
@@ -2346,12 +2561,16 @@ xor c > 5;
a b c
3 2 2
6 2 2
-explain
+explain extended
select t1.a, (select straight_join X.a from t1 as X join t1 as Y on X.a=Y.b where Y.a = t1.b) from t1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 PRIMARY t1 ALL NULL NULL NULL NULL 6
-2 DEPENDENT SUBQUERY X ALL PRIMARY NULL NULL NULL 6
-2 DEPENDENT SUBQUERY Y eq_ref PRIMARY,b PRIMARY 4 test.t1.b 1 Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 6 100.00
+2 DEPENDENT SUBQUERY X ALL PRIMARY NULL NULL NULL 6 100.00
+2 DEPENDENT SUBQUERY Y eq_ref PRIMARY,b PRIMARY 4 test.t1.b 1 100.00 Using where
+Warnings:
+Note 1276 Field or reference 'test.t1.b' of SELECT #2 was resolved in SELECT #1
+Note 1644 Can't push table 'Y' as child of 'X', column 't1.b' is outside scope of pushable join
+Note 1003 select `test`.`t1`.`a` AS `a`,(select straight_join `test`.`X`.`a` from `test`.`t1` `X` join `test`.`t1` `Y` where ((`test`.`Y`.`b` = `test`.`X`.`a`) and (`test`.`Y`.`a` = `test`.`t1`.`b`))) AS `(select straight_join X.a from t1 as X join t1 as Y on X.a=Y.b where Y.a = t1.b)` from `test`.`t1`
select t1.a, (select straight_join X.a from t1 as X join t1 as Y on X.a=Y.b where Y.a = t1.b) from t1;
a (select straight_join X.a from t1 as X join t1 as Y on X.a=Y.b where Y.a = t1.b)
1 NULL
@@ -2365,14 +2584,18 @@ create table t1 (a int primary key, b in
create table t2 (a int primary key, b int) engine = myisam;
insert into t1 values(1,1), (2,2), (3,3), (4,4);
insert into t2 values(1,1), (2,2), (3,3), (4,4);
-explain
+explain extended
select * from t1, t2, t1 as t3
where t2.a = t1.b
and t3.a = t2.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 4
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.b 1
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.b 1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 4 50.00
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 100.00
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.b 1 100.00
+Warnings:
+Note 1644 Table 't2' not in ndb engine, not pushable
+Note 1644 Can't push table 't3' as child of 't1', column 't2.b' is outside scope of pushable join
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t1` join `test`.`t2` join `test`.`t1` `t3` where ((`test`.`t3`.`a` = `test`.`t2`.`b`) and (`test`.`t2`.`a` = `test`.`t1`.`b`))
select * from t1, t2, t1 as t3
where t2.a = t1.b
and t3.a = t2.b;
@@ -2393,13 +2616,15 @@ insert into t2 values (2,1);
insert into t2 values (3,3);
insert into t2 values (4,1);
set ndb_join_pushdown=true;
-explain
+explain extended
select t1.a, t1.b, t2.a, t2.b
from t1, t2
where t2.a = t1.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Parent of 2 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 4 50.00 Parent of 2 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` join `test`.`t2` where (`test`.`t2`.`a` = `test`.`t1`.`b`)
select t1.a, t1.b, t2.a, t2.b
from t1, t2
where t2.a = t1.b;
@@ -2408,27 +2633,31 @@ a b a b
2 1 1 1
3 3 3 3
4 1 1 1
-explain
+explain extended
select t1.a, t1.b, t2.a, t2.b
from t1, t2
where t2.a = t1.b
and t1.a = 2;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Parent of 2 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 100.00 Parent of 2 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`a` = 2) and (`test`.`t2`.`a` = `test`.`t1`.`b`))
select t1.a, t1.b, t2.a, t2.b
from t1, t2
where t2.a = t1.b
and t1.a = 2;
a b a b
2 1 1 1
-explain
+explain extended
select t1.a, t1.b, t2.a, t2.b
from t1, t2
where t1.a = t2.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 4 Parent of 2 pushed join@1
-1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 4 50.00 Parent of 2 pushed join@1
+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` join `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`b`)
select t1.a, t1.b, t2.a, t2.b
from t1, t2
where t2.a = t1.b;
@@ -2437,27 +2666,32 @@ a b a b
2 1 1 1
3 3 3 3
4 1 1 1
-explain
+explain extended
select t1.a, t1.b, t2.a, t2.b
from t1, t2
where t1.a = t2.b
and t2.a = 3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1 Parent of 2 pushed join@1
-1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1 100.00 Parent of 2 pushed join@1
+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`a` = 3) and (`test`.`t1`.`a` = `test`.`t2`.`b`))
select t1.a, t1.b, t2.a, t2.b
from t1, t2
where t1.a = t2.b
and t2.a = 3;
a b a b
3 3 3 3
-explain
+explain extended
select *
from t1, t2
where t2.a = t1.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 4
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.b 1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 4 100.00
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 100.00
+Warnings:
+Note 1644 Table 't1' not pushable, select list can't contain BLOB columns
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` join `test`.`t2` where (`test`.`t2`.`a` = `test`.`t1`.`b`)
select *
from t1, t2
where t2.a = t1.b;
@@ -2466,27 +2700,33 @@ a b c a b
2 1 kalle 1 1
3 3 kalle 3 3
4 1 kalle 1 1
-explain
+explain extended
select *
from t1, t2
where t2.a = t1.b
and t1.a = 2;
-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 eq_ref PRIMARY PRIMARY 4 const 1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 100.00
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 const 1 100.00
+Warnings:
+Note 1644 Table 't1' not pushable, select list can't contain BLOB columns
+Note 1003 select '2' AS `a`,'1' AS `b`,'kalle' AS `c`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`a` = '1'))
select *
from t1, t2
where t2.a = t1.b
and t1.a = 2;
a b c a b
2 1 kalle 1 1
-explain
+explain extended
select *
from t1, t2
where t1.a = t2.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 ALL NULL NULL NULL NULL 4
-1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.b 1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 4 100.00
+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.b 1 100.00
+Warnings:
+Note 1644 Table 't1' not pushable, select list can't contain BLOB columns
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` join `test`.`t2` where (`test`.`t1`.`a` = `test`.`t2`.`b`)
select *
from t1, t2
where t2.a = t1.b;
@@ -2495,14 +2735,17 @@ a b c a b
2 1 kalle 1 1
3 3 kalle 3 3
4 1 kalle 1 1
-explain
+explain extended
select *
from t1, t2
where t1.a = t2.b
and t2.a = 3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1
-1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.b 1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1 100.00
+1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t2.b 1 100.00
+Warnings:
+Note 1644 Table 't1' not pushable, select list can't contain BLOB columns
+Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`a` = 3) and (`test`.`t1`.`a` = `test`.`t2`.`b`))
select *
from t1, t2
where t1.a = t2.b
@@ -2515,11 +2758,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3="63";
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 5 test.x.d3,const 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 5 test.x.d3,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f) and (`test`.`y`.`b3` = '63'))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3="63";
a3 b3 c3 d3 a3 b3 c3 d3
47 63 2 47 47 63 2 47
@@ -2529,11 +2774,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 5 test.x.d3,const 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 5 test.x.d3,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = (60 + 3)) and (`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
a3 b3 c3 d3 a3 b3 c3 d3
47 63 2 47 47 63 2 47
@@ -2543,11 +2790,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 6 test.x.d3,const 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 6 test.x.d3,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = (60 + 3)) and (`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
a3 b3 c3 d3 a3 b3 c3 d3
47 63 2 47 47 63 2 47
@@ -2557,11 +2806,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 6 test.x.d3,const 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 6 test.x.d3,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = (60 + 3)) and (`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
a3 b3 c3 d3 a3 b3 c3 d3
47 63 2 47 47 63 2 47
@@ -2571,11 +2822,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 7 test.x.d3,const 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 7 test.x.d3,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = (60 + 3)) and (`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
a3 b3 c3 d3 a3 b3 c3 d3
47 63 2 47 47 63 2 47
@@ -2585,11 +2838,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 7 test.x.d3,const 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 7 test.x.d3,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = (60 + 3)) and (`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
a3 b3 c3 d3 a3 b3 c3 d3
47 63 2 47 47 63 2 47
@@ -2599,11 +2854,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d3,const 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d3,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = (60 + 3)) and (`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
a3 b3 c3 d3 a3 b3 c3 d3
47 63 2 47 47 63 2 47
@@ -2613,11 +2870,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d3,const 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d3,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = (60 + 3)) and (`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
a3 b3 c3 d3 a3 b3 c3 d3
47 63 2 47 47 63 2 47
@@ -2627,11 +2886,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 12 test.x.d3,const 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 12 test.x.d3,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = 63) and (`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
a3 b3 c3 d3 a3 b3 c3 d3
47 63 2 47 47 63 2 47
@@ -2641,11 +2902,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 12 test.x.d3,const 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 12 test.x.d3,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = 63) and (`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
a3 b3 c3 d3 a3 b3 c3 d3
47 63 2 47 47 63 2 47
@@ -2655,11 +2918,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 0, 1, 0x1f);
insert into t3 values (0x2f, 1, 2, 0x2f);
insert into t3 values (0x3f, 0, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 5 test.x.d3,const 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 5 test.x.d3,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = 1) and (`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=1;
a3 b3 c3 d3 a3 b3 c3 d3
47 1 2 47 47 1 2 47
@@ -2669,11 +2934,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 2.71, 1, 0x1f);
insert into t3 values (0x2f, 3.00, 2, 0x2f);
insert into t3 values (0x3f, 0.50, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=3.0;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d3,const 1 Child of pushed join@1; Using where with pushed condition
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d3,const 1 100.00 Child of pushed join@1; Using where with pushed condition: (`test`.`y`.`b3` = 3.0)
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f) and (`test`.`y`.`b3` = 3.0))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=3.0;
a3 b3 c3 d3 a3 b3 c3 d3
47 3 2 47 47 3 2 47
@@ -2683,11 +2950,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 2.71, 1, 0x1f);
insert into t3 values (0x2f, 3.00, 2, 0x2f);
insert into t3 values (0x3f, 0.50, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=3.0;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d3,const 1 Child of pushed join@1; Using where with pushed condition
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 8 test.x.d3,const 1 100.00 Child of pushed join@1; Using where with pushed condition: (`test`.`y`.`b3` = 3.0)
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f) and (`test`.`y`.`b3` = 3.0))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=3.0;
a3 b3 c3 d3 a3 b3 c3 d3
47 3 2 47 47 3 2 47
@@ -2697,11 +2966,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 2.71, 1, 0x1f);
insert into t3 values (0x2f, 3.14, 2, 0x2f);
insert into t3 values (0x3f, 0.50, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=3.14;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 12 test.x.d3,const 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 12 test.x.d3,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f) and (`test`.`y`.`b3` = 3.14))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=3.14;
a3 b3 c3 d3 a3 b3 c3 d3
47 3.14 2 47 47 3.14 2 47
@@ -2711,11 +2982,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 2.71, 1, 0x1f);
insert into t3 values (0x2f, 3.14, 2, 0x2f);
insert into t3 values (0x3f, 0.50, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=3.14;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 12 test.x.d3,const 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 12 test.x.d3,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f) and (`test`.`y`.`b3` = 3.14))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=3.14;
a3 b3 c3 d3 a3 b3 c3 d3
47 3.14 2 47 47 3.14 2 47
@@ -2725,11 +2998,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=63;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 9 test.x.d3,const 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 9 test.x.d3,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f) and (`test`.`y`.`b3` = 63))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=63;
a3 b3 c3 d3 a3 b3 c3 d3
47 63 2 47 47 63 2 47
@@ -2739,11 +3014,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 2.71, 1, 0x1f);
insert into t3 values (0x2f, 3.14, 2, 0x2f);
insert into t3 values (0x3f, 0.50, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=3.14;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 10 test.x.d3,const 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 10 test.x.d3,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = 3.14) and (`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=3.14;
a3 b3 c3 d3 a3 b3 c3 d3
47 3.1400 2 47 47 3.1400 2 47
@@ -2753,11 +3030,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, '1905-05-17', 1, 0x1f);
insert into t3 values (0x2f, '2000-02-28', 2, 0x2f);
insert into t3 values (0x3f, '2000-02-29', 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='2000-02-28';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 7 test.x.d3,const 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 7 test.x.d3,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = '2000-02-28') and (`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='2000-02-28';
a3 b3 c3 d3 a3 b3 c3 d3
47 2000-02-28 2 47 47 2000-02-28 2 47
@@ -2767,11 +3046,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, '1905-05-17 12:30:00', 1, 0x1f);
insert into t3 values (0x2f, '2000-02-28 23:59:00', 2, 0x2f);
insert into t3 values (0x3f, '2000-02-29 12:59:59', 2, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='2000-02-28 23:59';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 12 test.x.d3,const 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 12 test.x.d3,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = '2000-02-28 23:59') and (`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='2000-02-28 23:59';
a3 b3 c3 d3 a3 b3 c3 d3
47 2000-02-28 23:59:00 2 47 47 2000-02-28 23:59:00 2 47
@@ -2781,11 +3062,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, '12:30:00', 1, 0x1f);
insert into t3 values (0x2f, '23:59:00', 2, 0x2f);
insert into t3 values (0x3f, '12:59:59', 2, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='23:59';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 7 test.x.d3,const 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 7 test.x.d3,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f) and (`test`.`y`.`b3` = 235900))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='23:59';
a3 b3 c3 d3 a3 b3 c3 d3
47 23:59:00 2 47 47 23:59:00 2 47
@@ -2795,11 +3078,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 'Ole', 1, 0x1f);
insert into t3 values (0x2f, 'Dole', 2, 0x2f);
insert into t3 values (0x3f, 'Doffen', 2, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='Dole';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 20 test.x.d3,const 1 Child of pushed join@1; Using where with pushed condition
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 20 test.x.d3,const 1 100.00 Child of pushed join@1; Using where with pushed condition: (`test`.`y`.`b3` = 'Dole')
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = 'Dole') and (`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='Dole';
a3 b3 c3 d3 a3 b3 c3 d3
47 Dole 2 47 47 Dole 2 47
@@ -2809,11 +3094,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 'Ole', 1, 0x1f);
insert into t3 values (0x2f, 'Dole', 2, 0x2f);
insert into t3 values (0x3f, 'Doffen', 2, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='Dole';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 22 test.x.d3,const 1 Child of pushed join@1; Using where with pushed condition
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 22 test.x.d3,const 1 100.00 Child of pushed join@1; Using where with pushed condition: (`test`.`y`.`b3` = 'Dole')
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = 'Dole') and (`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='Dole';
a3 b3 c3 d3 a3 b3 c3 d3
47 Dole 2 47 47 Dole 2 47
@@ -2823,11 +3110,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 'Ole', 1, 0x1f);
insert into t3 values (0x2f, 'Dole', 2, 0x2f);
insert into t3 values (0x3f, 'Doffen', 2, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='Dole';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 518 test.x.d3,const 1 Child of pushed join@1; Using where with pushed condition
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 518 test.x.d3,const 1 100.00 Child of pushed join@1; Using where with pushed condition: (`test`.`y`.`b3` = 'Dole')
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = 'Dole') and (`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='Dole';
a3 b3 c3 d3 a3 b3 c3 d3
47 Dole 2 47 47 Dole 2 47
@@ -2837,11 +3126,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 'Ole', 1, 0x1f);
insert into t3 values (0x2f, 'Dole', 2, 0x2f);
insert into t3 values (0x3f, 'Doffen', 2, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='Dole';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 20 test.x.d3,const 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 20 test.x.d3,const 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = 'Dole') and (`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='Dole';
a3 b3 c3 d3 a3 b3 c3 d3
drop table t3;
@@ -2850,11 +3141,13 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 'Ole', 1, 0x1f);
insert into t3 values (0x2f, 'Dole', 2, 0x2f);
insert into t3 values (0x3f, 'Doffen', 2, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='Dole';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 22 test.x.d3,const 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 4 const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 22 test.x.d3,const 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = 'Dole') and (`test`.`y`.`a3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 0x2f))
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='Dole';
a3 b3 c3 d3 a3 b3 c3 d3
47 Dole 2 47 47 Dole 2 47
@@ -2864,11 +3157,14 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where y.a3=x.b3 and y.b3="63";
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ALL NULL NULL NULL NULL 3
-1 SIMPLE y eq_ref PRIMARY PRIMARY 5 test.x.b3,const 1 Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ALL NULL NULL NULL NULL 3 66.67
+1 SIMPLE y eq_ref PRIMARY PRIMARY 5 test.x.b3,const 1 100.00 Using where
+Warnings:
+Note 1644 Can't push table 'y' as child, column 'a3' does not have same datatype as ref'ed column 'x.b3'
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`a3` = `test`.`x`.`b3`) and (`test`.`y`.`b3` = '63'))
select * from t3 x, t3 y where y.a3=x.b3 and y.b3="63";
a3 b3 c3 d3 a3 b3 c3 d3
31 47 1 31 47 63 2 47
@@ -2878,36 +3174,44 @@ primary key(a3,b3)) engine = ndb;
insert into t3 values ('Ole', 0x1f, 1, 0x1f);
insert into t3 values ('Dole', 0x2f, 2, 0x2f);
insert into t3 values ('Doffen', 0x3f, 2, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where x.a3='Dole' and x.b3=0x2f and y.a3=x.a3 and y.b3=x.d3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x const PRIMARY PRIMARY 22 const,const 1 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE y eq_ref PRIMARY PRIMARY 22 const,test.x.d3 1 Child of pushed join@1; Using where with pushed condition
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x const PRIMARY PRIMARY 22 const,const 1 100.00 Parent of 2 pushed join@1; Using where with pushed condition: (`test`.`x`.`a3` = 'Dole')
+1 SIMPLE y eq_ref PRIMARY PRIMARY 22 const,test.x.d3 1 100.00 Child of pushed join@1; Using where with pushed condition: (`test`.`y`.`a3` = 'Dole')
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 'Dole') and (`test`.`y`.`a3` = 'Dole') and (`test`.`x`.`b3` = 0x2f))
select * from t3 x, t3 y where x.a3='Dole' and x.b3=0x2f and y.a3=x.a3 and y.b3=x.d3;
a3 b3 c3 d3 a3 b3 c3 d3
Dole 47 2 47 Dole 47 2 47
-explain
+explain extended
select * from t3 x, t3 y where x.a3='Dole' and y.a3=x.a3 and y.b3=x.d3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY PRIMARY 18 const 10 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE y eq_ref PRIMARY PRIMARY 22 const,test.x.d3 1 Child of pushed join@1; Using where with pushed condition
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY PRIMARY 18 const 10 100.00 Parent of 2 pushed join@1; Using where with pushed condition: (`test`.`x`.`a3` = 'Dole')
+1 SIMPLE y eq_ref PRIMARY PRIMARY 22 const,test.x.d3 1 100.00 Child of pushed join@1; Using where with pushed condition: (`test`.`y`.`a3` = 'Dole')
+Warnings:
+Note 1003 select `test`.`x`.`a3` AS `a3`,`test`.`x`.`b3` AS `b3`,`test`.`x`.`c3` AS `c3`,`test`.`x`.`d3` AS `d3`,`test`.`y`.`a3` AS `a3`,`test`.`y`.`b3` AS `b3`,`test`.`y`.`c3` AS `c3`,`test`.`y`.`d3` AS `d3` from `test`.`t3` `x` join `test`.`t3` `y` where ((`test`.`y`.`b3` = `test`.`x`.`d3`) and (`test`.`x`.`a3` = 'Dole') and (`test`.`y`.`a3` = 'Dole'))
select * from t3 x, t3 y where x.a3='Dole' and y.a3=x.a3 and y.b3=x.d3;
a3 b3 c3 d3 a3 b3 c3 d3
Dole 47 2 47 Dole 47 2 47
drop table t3;
create table t1 (k int primary key, b int) engine = ndb;
insert into t1 values (1,1), (2,1), (3,1), (4,1);
-explain
+explain extended
select *
from t1
straight_join t1 as t2 on t2.k = t1.b+0
straight_join t1 as t3 on t3.k = t2.b
straight_join t1 as t4 on t4.k = t1.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Parent of 2 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 func 1 Parent of 2 pushed join@2; Using where
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.b 1 Child of pushed join@2
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 4 50.00 Parent of 2 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 func 1 100.00 Parent of 2 pushed join@2; Using where
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.b 1 100.00 Child of pushed join@2
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1644 Can't push table 't2' as child, column 'k' does neither 'ref' a column nor a constant
+Note 1644 Can't push table 't3' as child of 't1', column 't2.b' is outside scope of pushable join
+Note 1003 select `test`.`t1`.`k` AS `k`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`k` AS `k`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`k` AS `k`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`k` AS `k`,`test`.`t4`.`b` AS `b` from `test`.`t1` straight_join `test`.`t1` `t2` straight_join `test`.`t1` `t3` straight_join `test`.`t1` `t4` where ((`test`.`t3`.`k` = `test`.`t2`.`b`) and (`test`.`t4`.`k` = `test`.`t1`.`b`) and (`test`.`t2`.`k` = (`test`.`t1`.`b` + 0)))
select *
from t1
straight_join t1 as t2 on t2.k = t1.b+0
@@ -2918,18 +3222,22 @@ k b k b k b k b
2 1 1 1 1 1 1 1
3 1 1 1 1 1 1 1
4 1 1 1 1 1 1 1
-explain
+explain extended
select *
from t1
straight_join t1 as t2 on t2.k = t1.b+0
straight_join t1 as t3 on t3.k = t2.b
straight_join t1 as t4 on t4.k = t1.b
where t2.k = 1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Parent of 2 pushed join@1; Using where
-1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1 Parent of 2 pushed join@2
-1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.b 1 Child of pushed join@2
-1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ALL NULL NULL NULL NULL 4 100.00 Parent of 2 pushed join@1; Using where
+1 SIMPLE t2 const PRIMARY PRIMARY 4 const 1 100.00 Parent of 2 pushed join@2
+1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t2.b 1 100.00 Child of pushed join@2
+1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t1.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1644 Can't push table 't2' as child of 't1', their dependency is 'const'
+Note 1644 Can't push table 't3' as child of 't1', column 't2.b' is outside scope of pushable join
+Note 1003 select `test`.`t1`.`k` AS `k`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`k` AS `k`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`k` AS `k`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`k` AS `k`,`test`.`t4`.`b` AS `b` from `test`.`t1` straight_join `test`.`t1` `t2` straight_join `test`.`t1` `t3` straight_join `test`.`t1` `t4` where ((`test`.`t3`.`k` = `test`.`t2`.`b`) and (`test`.`t4`.`k` = `test`.`t1`.`b`) and (`test`.`t2`.`k` = 1) and (1 = (`test`.`t1`.`b` + 0)))
select *
from t1
straight_join t1 as t2 on t2.k = t1.b+0
@@ -2998,48 +3306,60 @@ b int not null, primary key(a)) engine =
insert into T2 values (10, 11);
insert into T2 values (11, 12);
insert into T2 values (12, 13);
-explain select * from T1, T2 where T1.c = T2.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE T1 ALL NULL NULL NULL NULL 3 Parent of 2 pushed join@1
-1 SIMPLE T2 eq_ref PRIMARY PRIMARY 4 test.T1.c 1 Child of pushed join@1
+explain extended select * from T1, T2 where T1.c = T2.a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE T1 ALL NULL NULL NULL NULL 3 66.67 Parent of 2 pushed join@1
+1 SIMPLE T2 eq_ref PRIMARY PRIMARY 4 test.T1.c 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`T1`.`a` AS `a`,`test`.`T1`.`b` AS `b`,`test`.`T1`.`c` AS `c`,`test`.`T2`.`a` AS `a`,`test`.`T2`.`b` AS `b` from `test`.`T1` join `test`.`T2` where (`test`.`T2`.`a` = `test`.`T1`.`c`)
select * from T1, T2 where T1.c = T2.a;
a b c a b
10 11 11 11 12
11 12 12 12 13
-explain select * from T1, T2 where T1.a=11 and T1.c = T2.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE T1 const PRIMARY PRIMARY 4 const 1 Parent of 2 pushed join@1
-1 SIMPLE T2 eq_ref PRIMARY PRIMARY 4 test.T1.c 1 Child of pushed join@1
+explain extended select * from T1, T2 where T1.a=11 and T1.c = T2.a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE T1 const PRIMARY PRIMARY 4 const 1 100.00 Parent of 2 pushed join@1
+1 SIMPLE T2 eq_ref PRIMARY PRIMARY 4 test.T1.c 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`T1`.`a` AS `a`,`test`.`T1`.`b` AS `b`,`test`.`T1`.`c` AS `c`,`test`.`T2`.`a` AS `a`,`test`.`T2`.`b` AS `b` from `test`.`T1` join `test`.`T2` where ((`test`.`T2`.`a` = `test`.`T1`.`c`) and (`test`.`T1`.`a` = 11))
select * from T1, T2 where T1.a=11 and T1.c = T2.a;
a b c a b
11 12 12 12 13
-explain select * from T2, T1 where T2.b = T1.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE T2 ALL NULL NULL NULL NULL 3 Parent of 2 pushed join@1
-1 SIMPLE T1 eq_ref PRIMARY PRIMARY 4 test.T2.b 1 Child of pushed join@1
+explain extended select * from T2, T1 where T2.b = T1.a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE T2 ALL NULL NULL NULL NULL 3 66.67 Parent of 2 pushed join@1
+1 SIMPLE T1 eq_ref PRIMARY PRIMARY 4 test.T2.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`T2`.`a` AS `a`,`test`.`T2`.`b` AS `b`,`test`.`T1`.`a` AS `a`,`test`.`T1`.`b` AS `b`,`test`.`T1`.`c` AS `c` from `test`.`T2` join `test`.`T1` where (`test`.`T1`.`a` = `test`.`T2`.`b`)
select * from T2, T1 where T2.b = T1.a;
a b a b c
10 11 11 12 12
11 12 12 13 13
-explain select * from T2, T1 where T2.a=11 and T2.b = T1.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE T2 const PRIMARY PRIMARY 4 const 1 Parent of 2 pushed join@1
-1 SIMPLE T1 eq_ref PRIMARY PRIMARY 4 test.T2.b 1 Child of pushed join@1
+explain extended select * from T2, T1 where T2.a=11 and T2.b = T1.a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE T2 const PRIMARY PRIMARY 4 const 1 100.00 Parent of 2 pushed join@1
+1 SIMPLE T1 eq_ref PRIMARY PRIMARY 4 test.T2.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`T2`.`a` AS `a`,`test`.`T2`.`b` AS `b`,`test`.`T1`.`a` AS `a`,`test`.`T1`.`b` AS `b`,`test`.`T1`.`c` AS `c` from `test`.`T2` join `test`.`T1` where ((`test`.`T1`.`a` = `test`.`T2`.`b`) and (`test`.`T2`.`a` = 11))
select * from T2, T1 where T2.a=11 and T2.b = T1.a;
a b a b c
11 12 12 13 13
-explain select T1.a, T1.c, T2.a, T2.b from T1, T2 where T1.b = T2.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE T1 ALL NULL NULL NULL NULL 3 Parent of 2 pushed join@1
-1 SIMPLE T2 eq_ref PRIMARY PRIMARY 4 test.T1.b 1 Child of pushed join@1
+explain extended select T1.a, T1.c, T2.a, T2.b from T1, T2 where T1.b = T2.a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE T1 ALL NULL NULL NULL NULL 3 100.00 Parent of 2 pushed join@1
+1 SIMPLE T2 eq_ref PRIMARY PRIMARY 4 test.T1.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`T1`.`a` AS `a`,`test`.`T1`.`c` AS `c`,`test`.`T2`.`a` AS `a`,`test`.`T2`.`b` AS `b` from `test`.`T1` join `test`.`T2` where (`test`.`T2`.`a` = `test`.`T1`.`b`)
select T1.a, T1.c, T2.a, T2.b from T1, T2 where T1.b = T2.a;
a c a b
10 11 11 12
11 12 12 13
-explain select T1.a, T1.c, T2.a, T2.b from T1, T2 where T1.a=11 and T1.b = T2.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE T1 const PRIMARY PRIMARY 4 const 1 Parent of 2 pushed join@1
-1 SIMPLE T2 eq_ref PRIMARY PRIMARY 4 test.T1.b 1 Child of pushed join@1
+explain extended select T1.a, T1.c, T2.a, T2.b from T1, T2 where T1.a=11 and T1.b = T2.a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE T1 const PRIMARY PRIMARY 4 const 1 100.00 Parent of 2 pushed join@1
+1 SIMPLE T2 eq_ref PRIMARY PRIMARY 4 test.T1.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`T1`.`a` AS `a`,`test`.`T1`.`c` AS `c`,`test`.`T2`.`a` AS `a`,`test`.`T2`.`b` AS `b` from `test`.`T1` join `test`.`T2` where ((`test`.`T2`.`a` = `test`.`T1`.`b`) and (`test`.`T1`.`a` = 11))
select T1.a, T1.c, T2.a, T2.b from T1, T2 where T1.a=11 and T1.b = T2.a;
a c a b
11 12 12 13
@@ -3113,20 +3433,24 @@ c int) engine = ndb;
insert into T1 values (1, 2, 3);
insert into T1 values (2, 3, 4);
insert into T1 values (3, 4, 5);
-explain select * from T1 x, T1 y where x.b=y.a and x.c=4;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ALL NULL NULL NULL NULL 3 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE y eq_ref PRIMARY PRIMARY 4 test.x.b 1 Child of pushed join@1
+explain extended select * from T1 x, T1 y where x.b=y.a and x.c=4;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ALL NULL NULL NULL NULL 3 66.67 Parent of 2 pushed join@1; Using where with pushed condition: (`test`.`x`.`c` = 4)
+1 SIMPLE y eq_ref PRIMARY PRIMARY 4 test.x.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a` AS `a`,`test`.`x`.`b` AS `b`,`test`.`x`.`c` AS `c`,`test`.`y`.`a` AS `a`,`test`.`y`.`b` AS `b`,`test`.`y`.`c` AS `c` from `test`.`T1` `x` join `test`.`T1` `y` where ((`test`.`x`.`c` = 4) and (`test`.`y`.`a` = `test`.`x`.`b`))
select * from T1 x, T1 y where x.b=y.a and x.c=4;
a b c a b c
2 3 4 3 4 5
lookups
1
-explain select * from T1 x, T1 y, T1 z where x.b=y.a and y.c=4 and y.b=z.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ALL NULL NULL NULL NULL 3 Parent of 3 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 4 test.x.b 1 Child of pushed join@1; Using where with pushed condition
-1 SIMPLE z eq_ref PRIMARY PRIMARY 4 test.y.b 1 Child of pushed join@1
+explain extended select * from T1 x, T1 y, T1 z where x.b=y.a and y.c=4 and y.b=z.a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ALL NULL NULL NULL NULL 3 100.00 Parent of 3 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 4 test.x.b 1 100.00 Child of pushed join@1; Using where with pushed condition: (`test`.`y`.`c` = 4)
+1 SIMPLE z eq_ref PRIMARY PRIMARY 4 test.y.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`a` AS `a`,`test`.`x`.`b` AS `b`,`test`.`x`.`c` AS `c`,`test`.`y`.`a` AS `a`,`test`.`y`.`b` AS `b`,`test`.`y`.`c` AS `c`,`test`.`z`.`a` AS `a`,`test`.`z`.`b` AS `b`,`test`.`z`.`c` AS `c` from `test`.`T1` `x` join `test`.`T1` `y` join `test`.`T1` `z` where ((`test`.`z`.`a` = `test`.`y`.`b`) and (`test`.`y`.`c` = 4) and (`test`.`y`.`a` = `test`.`x`.`b`))
select * from T1 x, T1 y, T1 z where x.b=y.a and y.c=4 and y.b=z.a;
a b c a b c a b c
1 2 3 2 3 4 3 4 5
@@ -3189,10 +3513,12 @@ insert into T1(a,b,c,d) values (10, 10,
insert into T1(a,b,c,d) values (11, 11, 12, 12);
insert into T1(a,b,c,d) values (12, 12, 13, 13);
create index i1 on T1(c,a);
-explain select count(*) from T1 t1, T1 t2 where t1.c = 12 and t1.a = 11 and t2.a = t1.d and t2.b = t1.d;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ref PRIMARY,i1 i1 8 const,const 10 Parent of 2 pushed join@1
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.d,test.t1.d 1 Child of pushed join@1
+explain extended select count(*) from T1 t1, T1 t2 where t1.c = 12 and t1.a = 11 and t2.a = t1.d and t2.b = t1.d;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 ref PRIMARY,i1 i1 8 const,const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 8 test.t1.d,test.t1.d 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select count(0) AS `count(*)` from `test`.`T1` `t1` join `test`.`T1` `t2` where ((`test`.`t2`.`a` = `test`.`t1`.`d`) and (`test`.`t2`.`b` = `test`.`t1`.`d`) and (`test`.`t1`.`a` = 11) and (`test`.`t1`.`c` = 12))
select count(*) from T1 t1, T1 t2 where t1.c = 12 and t1.a = 11 and t2.a = t1.d and t2.b = t1.d;
count(*)
1
@@ -3200,46 +3526,56 @@ drop index i1 on T1;
pruned_scan_count
1
create index i2 on T1(a,b);
-explain select count(*) from T1 t1, T1 t2 where t1.a = 11 and t1.b<13 and t2.a = t1.c and t2.b = t1.c;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,i2 i2 8 NULL 10 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE t2 eq_ref PRIMARY,i2 PRIMARY 8 test.t1.c,test.t1.c 1 Child of pushed join@1
+explain extended select count(*) from T1 t1, T1 t2 where t1.a = 11 and t1.b<13 and t2.a = t1.c and t2.b = t1.c;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 range PRIMARY,i2 i2 8 NULL 10 100.00 Parent of 2 pushed join@1; Using where with pushed condition: ((`test`.`t1`.`a` = 11) and (`test`.`t1`.`b` < 13))
+1 SIMPLE t2 eq_ref PRIMARY,i2 PRIMARY 8 test.t1.c,test.t1.c 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select count(0) AS `count(*)` from `test`.`T1` `t1` join `test`.`T1` `t2` where ((`test`.`t2`.`a` = `test`.`t1`.`c`) and (`test`.`t2`.`b` = `test`.`t1`.`c`) and (`test`.`t1`.`a` = 11) and (`test`.`t1`.`b` < 13))
select count(*) from T1 t1, T1 t2 where t1.a = 11 and t1.b<13 and t2.a = t1.c and t2.b = t1.c;
count(*)
1
pruned_scan_count
1
-explain select count(*) from T1 t1, T1 t2 where t1.a >= 12 and t1.a<=12 and t2.a = t1.c and t2.b = t1.c;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,i2 i2 4 NULL 10 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE t2 eq_ref PRIMARY,i2 PRIMARY 8 test.t1.c,test.t1.c 1 Child of pushed join@1
+explain extended select count(*) from T1 t1, T1 t2 where t1.a >= 12 and t1.a<=12 and t2.a = t1.c and t2.b = t1.c;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 range PRIMARY,i2 i2 4 NULL 10 30.00 Parent of 2 pushed join@1; Using where with pushed condition: ((`test`.`t1`.`a` >= 12) and (`test`.`t1`.`a` <= 12))
+1 SIMPLE t2 eq_ref PRIMARY,i2 PRIMARY 8 test.t1.c,test.t1.c 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select count(0) AS `count(*)` from `test`.`T1` `t1` join `test`.`T1` `t2` where ((`test`.`t2`.`a` = `test`.`t1`.`c`) and (`test`.`t2`.`b` = `test`.`t1`.`c`) and (`test`.`t1`.`a` >= 12) and (`test`.`t1`.`a` <= 12))
select count(*) from T1 t1, T1 t2 where t1.a >= 12 and t1.a<=12 and t2.a = t1.c and t2.b = t1.c;
count(*)
0
pruned_scan_count
1
-explain select count(*) from T1 t1, T1 t2 where t1.a >= 11 and t1.a<=12 and t2.a = t1.c and t2.b = t1.c;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,i2 i2 4 NULL 10 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE t2 eq_ref PRIMARY,i2 PRIMARY 8 test.t1.c,test.t1.c 1 Child of pushed join@1
+explain extended select count(*) from T1 t1, T1 t2 where t1.a >= 11 and t1.a<=12 and t2.a = t1.c and t2.b = t1.c;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 range PRIMARY,i2 i2 4 NULL 10 30.00 Parent of 2 pushed join@1; Using where with pushed condition: ((`test`.`t1`.`a` >= 11) and (`test`.`t1`.`a` <= 12))
+1 SIMPLE t2 eq_ref PRIMARY,i2 PRIMARY 8 test.t1.c,test.t1.c 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select count(0) AS `count(*)` from `test`.`T1` `t1` join `test`.`T1` `t2` where ((`test`.`t2`.`a` = `test`.`t1`.`c`) and (`test`.`t2`.`b` = `test`.`t1`.`c`) and (`test`.`t1`.`a` >= 11) and (`test`.`t1`.`a` <= 12))
select count(*) from T1 t1, T1 t2 where t1.a >= 11 and t1.a<=12 and t2.a = t1.c and t2.b = t1.c;
count(*)
1
pruned_scan_count
0
-explain select count(*) from T1 t1, T1 t2 where (t1.a = 10 or t1.a=12) and t1.b<13 and t2.a = t1.c and t2.b = t1.c;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,i2 i2 8 NULL 20 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE t2 eq_ref PRIMARY,i2 PRIMARY 8 test.t1.c,test.t1.c 1 Child of pushed join@1
+explain extended select count(*) from T1 t1, T1 t2 where (t1.a = 10 or t1.a=12) and t1.b<13 and t2.a = t1.c and t2.b = t1.c;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 range PRIMARY,i2 i2 8 NULL 20 15.00 Parent of 2 pushed join@1; Using where with pushed condition: (((`test`.`t1`.`a` = 10) or (`test`.`t1`.`a` = 12)) and (`test`.`t1`.`b` < 13))
+1 SIMPLE t2 eq_ref PRIMARY,i2 PRIMARY 8 test.t1.c,test.t1.c 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select count(0) AS `count(*)` from `test`.`T1` `t1` join `test`.`T1` `t2` where ((`test`.`t2`.`a` = `test`.`t1`.`c`) and (`test`.`t2`.`b` = `test`.`t1`.`c`) and ((`test`.`t1`.`a` = 10) or (`test`.`t1`.`a` = 12)) and (`test`.`t1`.`b` < 13))
select count(*) from T1 t1, T1 t2 where (t1.a = 10 or t1.a=12) and t1.b<13 and t2.a = t1.c and t2.b = t1.c;
count(*)
1
pruned_scan_count
0
-explain select count(*) from T1 t1, T1 t2 where t1.a = 10 and (t1.b<11 or t1.b>11) and t2.a = t1.c and t2.b = t1.c;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY,i2 i2 8 NULL 20 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE t2 eq_ref PRIMARY,i2 PRIMARY 8 test.t1.c,test.t1.c 1 Child of pushed join@1
+explain extended select count(*) from T1 t1, T1 t2 where t1.a = 10 and (t1.b<11 or t1.b>11) and t2.a = t1.c and t2.b = t1.c;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 range PRIMARY,i2 i2 8 NULL 20 100.00 Parent of 2 pushed join@1; Using where with pushed condition: ((`test`.`t1`.`a` = 10) and ((`test`.`t1`.`b` < 11) or (`test`.`t1`.`b` > 11)))
+1 SIMPLE t2 eq_ref PRIMARY,i2 PRIMARY 8 test.t1.c,test.t1.c 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select count(0) AS `count(*)` from `test`.`T1` `t1` join `test`.`T1` `t2` where ((`test`.`t2`.`a` = `test`.`t1`.`c`) and (`test`.`t2`.`b` = `test`.`t1`.`c`) and (`test`.`t1`.`a` = 10) and ((`test`.`t1`.`b` < 11) or (`test`.`t1`.`b` > 11)))
select count(*) from T1 t1, T1 t2 where t1.a = 10 and (t1.b<11 or t1.b>11) and t2.a = t1.c and t2.b = t1.c;
count(*)
1
@@ -3264,10 +3600,12 @@ insert into T2(a,b,c,d,e,f) values (5, 6
insert into T2(a,b,c,d,e,f) values (6, 7, 8, 1, 2, 3);
insert into T2(a,b,c,d,e,f) values (7, 8, 9, 1, 2, 3);
create index i2_1 on T2(d, a, b, e);
-explain select count(*) from T2 x, T2 y where x.d=1 and x.a=1 and x.b=2 and y.a=x.d and y.b=x.e and y.c=3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY,i2_1 i2_1 12 const,const,const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 12 const,test.x.e,const 1 Child of pushed join@1
+explain extended select count(*) from T2 x, T2 y where x.d=1 and x.a=1 and x.b=2 and y.a=x.d and y.b=x.e and y.c=3;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY,i2_1 i2_1 12 const,const,const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 12 const,test.x.e,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select count(0) AS `count(*)` from `test`.`T2` `x` join `test`.`T2` `y` where ((`test`.`y`.`c` = 3) and (`test`.`y`.`b` = `test`.`x`.`e`) and (`test`.`x`.`b` = 2) and (`test`.`x`.`a` = 1) and (`test`.`x`.`d` = 1) and (`test`.`y`.`a` = 1))
select count(*) from T2 x, T2 y where x.d=1 and x.a=1 and x.b=2 and y.a=x.d and y.b=x.e and y.c=3;
count(*)
2
@@ -3275,10 +3613,12 @@ drop index i2_1 on T2;
pruned_scan_count
1
create index i2_3 on T2(a, d, b, e);
-explain select count(*) from T2 x, T2 y where x.d=1 and x.a=1 and x.b=2 and y.a=x.d and y.b=x.e and y.c=3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ref PRIMARY,i2_3 i2_3 12 const,const,const 10 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY,i2_3 PRIMARY 12 const,test.x.e,const 1 Child of pushed join@1
+explain extended select count(*) from T2 x, T2 y where x.d=1 and x.a=1 and x.b=2 and y.a=x.d and y.b=x.e and y.c=3;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ref PRIMARY,i2_3 i2_3 12 const,const,const 10 100.00 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY,i2_3 PRIMARY 12 const,test.x.e,const 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select count(0) AS `count(*)` from `test`.`T2` `x` join `test`.`T2` `y` where ((`test`.`y`.`c` = 3) and (`test`.`y`.`b` = `test`.`x`.`e`) and (`test`.`x`.`b` = 2) and (`test`.`x`.`a` = 1) and (`test`.`x`.`d` = 1) and (`test`.`y`.`a` = 1))
select count(*) from T2 x, T2 y where x.d=1 and x.a=1 and x.b=2 and y.a=x.d and y.b=x.e and y.c=3;
count(*)
2
@@ -3288,13 +3628,15 @@ pruned_scan_count
create table t1 (a binary(10) primary key, b binary(10) not null) engine = ndb;
insert into t1 values ('\0123456789', '1234567890');
insert into t1 values ('1234567890', '\0123456789');
-explain
+explain extended
select count(*)
from t1 join t1 as t2 on t2.a = t1.b
where t1.a = '\0123456789';
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 const PRIMARY PRIMARY 10 const 1 Parent of 2 pushed join@1; Using where
-1 SIMPLE t2 eq_ref PRIMARY PRIMARY 10 test.t1.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 const PRIMARY PRIMARY 10 const 1 100.00 Parent of 2 pushed join@1; Using where
+1 SIMPLE t2 eq_ref PRIMARY PRIMARY 10 test.t1.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select count(0) AS `count(*)` from `test`.`t1` join `test`.`t1` `t2` where ((`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t1`.`a` = '\0123456789'))
select count(*)
from t1 join t1 as t2 on t2.a = t1.b
where t1.a = '\0123456789';
@@ -3304,15 +3646,17 @@ drop table t1;
create table t1 (pk int primary key, a int unique key) engine = ndb;
insert into t1 values (1,10), (2,20), (3,30);
set ndb_join_pushdown = false;
-explain
+explain extended
select * from t1 as x right join t1 as y
on x.pk = y.pk
and x.pk = y.a
and x.a = y.pk
where y.pk = 2;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE y const PRIMARY PRIMARY 4 const 1
-1 SIMPLE x const PRIMARY,a NULL NULL NULL 1 Impossible ON condition
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE y const PRIMARY PRIMARY 4 const 1 100.00
+1 SIMPLE x const PRIMARY,a NULL NULL NULL 1 100.00 Impossible ON condition
+Warnings:
+Note 1003 select `test`.`x`.`pk` AS `pk`,`test`.`x`.`a` AS `a`,'2' AS `pk`,'20' AS `a` from `test`.`t1` `y` left join `test`.`t1` `x` on((multiple equal(2, `test`.`x`.`pk`, `test`.`x`.`a`))) where 1
select * from t1 as x right join t1 as y
on x.pk = y.pk
and x.pk = y.a
@@ -3321,15 +3665,18 @@ where y.pk = 2;
pk a pk a
NULL NULL 2 20
set ndb_join_pushdown = true;
-explain
+explain extended
select * from t1 as x right join t1 as y
on x.pk = y.pk
and x.pk = y.a
and x.a = y.pk
where y.pk = 2;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE y const PRIMARY PRIMARY 4 const 1
-1 SIMPLE x const PRIMARY,a PRIMARY 4 const 1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE y const PRIMARY PRIMARY 4 const 1 100.00
+1 SIMPLE x const PRIMARY,a PRIMARY 4 const 1 100.00
+Warnings:
+Note 1644 Can't push table 'x' as child of 'y', their dependency is 'const'
+Note 1003 select `test`.`x`.`pk` AS `pk`,`test`.`x`.`a` AS `a`,`test`.`y`.`pk` AS `pk`,`test`.`y`.`a` AS `a` from `test`.`t1` `y` left join `test`.`t1` `x` on(((`test`.`y`.`a` = 2) and (`test`.`x`.`pk` = 2) and (`test`.`x`.`a` = 2))) where (`test`.`y`.`pk` = 2)
select * from t1 as x right join t1 as y
on x.pk = y.pk
and x.pk = y.a
@@ -3343,11 +3690,13 @@ create index ix1 on t1(b,a);
insert into t1 values (0,1,10,20);
insert into t1 values (1,2,20,30);
insert into t1 values (2,3,30,40);
-explain select * from t1 as x join t1 as y join t1 as z on x.u=y.pk and y.a=z.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ALL NULL NULL NULL NULL 3 Parent of 3 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 4 test.x.u 1 Child of pushed join@1
-1 SIMPLE z ref ix1 ix1 5 test.y.a 1 Child of pushed join@1; Using where
+explain extended select * from t1 as x join t1 as y join t1 as z on x.u=y.pk and y.a=z.b;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ALL NULL NULL NULL NULL 3 66.67 Parent of 3 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 4 test.x.u 1 100.00 Child of pushed join@1
+1 SIMPLE z ref ix1 ix1 5 test.y.a 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select `test`.`x`.`pk` AS `pk`,`test`.`x`.`u` AS `u`,`test`.`x`.`a` AS `a`,`test`.`x`.`b` AS `b`,`test`.`y`.`pk` AS `pk`,`test`.`y`.`u` AS `u`,`test`.`y`.`a` AS `a`,`test`.`y`.`b` AS `b`,`test`.`z`.`pk` AS `pk`,`test`.`z`.`u` AS `u`,`test`.`z`.`a` AS `a`,`test`.`z`.`b` AS `b` from `test`.`t1` `x` join `test`.`t1` `y` join `test`.`t1` `z` where ((`test`.`z`.`b` = `test`.`y`.`a`) and (`test`.`y`.`pk` = `test`.`x`.`u`))
select * from t1 as x join t1 as y join t1 as z on x.u=y.pk and y.a=z.b;
pk u a b pk u a b pk u a b
0 1 10 20 1 2 20 30 0 1 10 20
@@ -3372,10 +3721,12 @@ insert into t1 values (0,-1), (1,-1), (2
(118,-1), (119,-1), (120,-1), (121,-1), (122,-1), (123,-1), (124,-1),
(125,-1), (126,-1), (127,-1), (128,-1), (129,-1), (130,-1), (131,-1),
(132,-1), (133,-1), (134,-1), (135,-1), (136,-1), (137,-1), (138,-1), (139,-1);
-explain select * from t1 as x join t1 as y on x.u=y.pk order by(x.pk);
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x index NULL PRIMARY 4 NULL 140 Parent of 2 pushed join@1
-1 SIMPLE y eq_ref PRIMARY PRIMARY 4 test.x.u 1 Child of pushed join@1
+explain extended select * from t1 as x join t1 as y on x.u=y.pk order by(x.pk);
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x index NULL PRIMARY 4 NULL 140 1.43 Parent of 2 pushed join@1
+1 SIMPLE y eq_ref PRIMARY PRIMARY 4 test.x.u 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x`.`pk` AS `pk`,`test`.`x`.`u` AS `u`,`test`.`y`.`pk` AS `pk`,`test`.`y`.`u` AS `u` from `test`.`t1` `x` join `test`.`t1` `y` where (`test`.`y`.`pk` = `test`.`x`.`u`) order by `test`.`x`.`pk`
select * from t1 as x join t1 as y on x.u=y.pk order by(x.pk);
pk u pk u
drop table t1;
@@ -3394,31 +3745,38 @@ insert into t1 values (8,8,10,10);
insert into t1 values (9,9,10,10);
insert into t1 values (10,10,10,10);
insert into t1 values (11,11,10,10);
-explain select count(*) from t1 as x1 join t1 as x2 join t1 as x3
+explain extended select count(*) from t1 as x1 join t1 as x2 join t1 as x3
on x1.a=x2.u and x2.a = x3.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x1 ALL NULL NULL NULL NULL 12 Parent of 3 pushed join@1
-1 SIMPLE x2 eq_ref ix2 ix2 4 test.x1.a 1 Child of pushed join@1
-1 SIMPLE x3 ref ix1 ix1 5 test.x2.a 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x1 ALL NULL NULL NULL NULL 12 16.67 Parent of 3 pushed join@1
+1 SIMPLE x2 eq_ref ix2 ix2 4 test.x1.a 1 100.00 Child of pushed join@1
+1 SIMPLE x3 ref ix1 ix1 5 test.x2.a 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select count(0) AS `count(*)` from `test`.`t1` `x1` join `test`.`t1` `x2` join `test`.`t1` `x3` where ((`test`.`x3`.`b` = `test`.`x2`.`a`) and (`test`.`x2`.`u` = `test`.`x1`.`a`))
select count(*) from t1 as x1 join t1 as x2 join t1 as x3
on x1.a=x2.u and x2.a = x3.b;
count(*)
144
-explain select count(*) from t1 as x1, t1 as x2, t1 as x3
+explain extended select count(*) from t1 as x1, t1 as x2, t1 as x3
where x1.u=x2.pk and x1.a=x3.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x1 ALL ix2 NULL NULL NULL 12 Parent of 3 pushed join@1
-1 SIMPLE x2 eq_ref PRIMARY PRIMARY 4 test.x1.u 1 Child of pushed join@1
-1 SIMPLE x3 ref ix1 ix1 5 test.x1.a 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x1 ALL ix2 NULL NULL NULL 12 100.00 Parent of 3 pushed join@1
+1 SIMPLE x2 eq_ref PRIMARY PRIMARY 4 test.x1.u 1 100.00 Child of pushed join@1
+1 SIMPLE x3 ref ix1 ix1 5 test.x1.a 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select count(0) AS `count(*)` from `test`.`t1` `x1` join `test`.`t1` `x2` join `test`.`t1` `x3` where ((`test`.`x3`.`b` = `test`.`x1`.`a`) and (`test`.`x2`.`pk` = `test`.`x1`.`u`))
select count(*) from t1 as x1, t1 as x2, t1 as x3
where x1.u=x2.pk and x1.a=x3.b;
count(*)
144
insert into t1 values (12,12,20,10);
-explain select count(*) from t1 as x1 left join t1 as x2 on x1.a=x2.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x1 ALL NULL NULL NULL NULL 13
-1 SIMPLE x2 ref ix1 ix1 5 test.x1.a 1
+explain extended select count(*) from t1 as x1 left join t1 as x2 on x1.a=x2.b;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x1 ALL NULL NULL NULL NULL 13 92.31
+1 SIMPLE x2 ref ix1 ix1 5 test.x1.a 1 100.00
+Warnings:
+Note 1644 Can't push table 'x2' as child of 'x1', outer join with scan-ancestor 'x1' not implemented
+Note 1003 select count(0) AS `count(*)` from `test`.`t1` `x1` left join `test`.`t1` `x2` on((`test`.`x1`.`a` = `test`.`x2`.`b`)) where 1
select count(*) from t1 as x1 left join t1 as x2 on x1.a=x2.b;
count(*)
157
@@ -3427,13 +3785,16 @@ select count(*) from t1 as x1 left join
count(*)
157
set ndb_join_pushdown=on;
-explain select count(*) from t1 as x1
+explain extended select count(*) from t1 as x1
left join t1 as x2 on x1.u=x2.pk
left join t1 as x3 on x2.a=x3.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x1 ALL NULL NULL NULL NULL 13 Parent of 2 pushed join@1
-1 SIMPLE x2 eq_ref PRIMARY PRIMARY 4 test.x1.u 1 Child of pushed join@1
-1 SIMPLE x3 ref ix1 ix1 5 test.x2.a 1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x1 ALL NULL NULL NULL NULL 13 100.00 Parent of 2 pushed join@1
+1 SIMPLE x2 eq_ref PRIMARY PRIMARY 4 test.x1.u 1 100.00 Child of pushed join@1
+1 SIMPLE x3 ref ix1 ix1 5 test.x2.a 1 100.00
+Warnings:
+Note 1644 Can't push table 'x3' as child of 'x1', outer join with scan-ancestor 'x1' not implemented
+Note 1003 select count(0) AS `count(*)` from `test`.`t1` `x1` left join `test`.`t1` `x2` on((`test`.`x1`.`u` = `test`.`x2`.`pk`)) left join `test`.`t1` `x3` on((`test`.`x2`.`a` = `test`.`x3`.`b`)) where 1
select count(*) from t1 as x1
left join t1 as x2 on x1.u=x2.pk
left join t1 as x3 on x2.a=x3.b;
@@ -3446,17 +3807,23 @@ left join t1 as x3 on x2.a=x3.b;
count(*)
157
set ndb_join_pushdown=on;
-explain select count(*) from t1 as x1
+explain extended select count(*) from t1 as x1
left join t1 as x2 on x1.u=x2.pk
left join t1 as x3 on x2.a=x3.b
left join t1 as x4 on x3.u=x4.pk
left join t1 as x5 on x4.a=x5.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x1 ALL NULL NULL NULL NULL 13 Parent of 2 pushed join@1
-1 SIMPLE x2 eq_ref PRIMARY PRIMARY 4 test.x1.u 1 Child of pushed join@1
-1 SIMPLE x3 ref ix1 ix1 5 test.x2.a 1 Parent of 2 pushed join@2
-1 SIMPLE x4 eq_ref PRIMARY PRIMARY 4 test.x3.u 1 Child of pushed join@2
-1 SIMPLE x5 ref ix1 ix1 5 test.x4.a 1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x1 ALL NULL NULL NULL NULL 13 100.00 Parent of 2 pushed join@1
+1 SIMPLE x2 eq_ref PRIMARY PRIMARY 4 test.x1.u 1 100.00 Child of pushed join@1
+1 SIMPLE x3 ref ix1 ix1 5 test.x2.a 1 100.00 Parent of 2 pushed join@2
+1 SIMPLE x4 eq_ref PRIMARY PRIMARY 4 test.x3.u 1 100.00 Child of pushed join@2
+1 SIMPLE x5 ref ix1 ix1 5 test.x4.a 1 100.00
+Warnings:
+Note 1644 Can't push table 'x3' as child of 'x1', outer join with scan-ancestor 'x1' not implemented
+Note 1644 Can't push table 'x4' as child of 'x1', column 'x3.u' is outside scope of pushable join
+Note 1644 Can't push table 'x5' as child of 'x1', column 'x4.a' is outside scope of pushable join
+Note 1644 Can't push table 'x5' as child of 'x3', outer join with scan-ancestor 'x3' not implemented
+Note 1003 select count(0) AS `count(*)` from `test`.`t1` `x1` left join `test`.`t1` `x2` on((`test`.`x1`.`u` = `test`.`x2`.`pk`)) left join `test`.`t1` `x3` on((`test`.`x2`.`a` = `test`.`x3`.`b`)) left join `test`.`t1` `x4` on((`test`.`x3`.`u` = `test`.`x4`.`pk`)) left join `test`.`t1` `x5` on((`test`.`x4`.`a` = `test`.`x5`.`b`)) where 1
select count(*) from t1 as x1
left join t1 as x2 on x1.u=x2.pk
left join t1 as x3 on x2.a=x3.b
@@ -3473,27 +3840,34 @@ left join t1 as x5 on x4.a=x5.b;
count(*)
1885
set ndb_join_pushdown=on;
-explain select count(*) from t1 as x1
+explain extended select count(*) from t1 as x1
join t1 as x2 on x1.a=x2.b
where x1.pk = 1 or x1.u=1;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x1 index_merge PRIMARY,ix2 ix2,PRIMARY 4,4 NULL 2 Using sort_union(ix2,PRIMARY); Using where with pushed condition
-1 SIMPLE x2 ref ix1 ix1 5 test.x1.a 1 Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x1 index_merge PRIMARY,ix2 ix2,PRIMARY 4,4 NULL 2 100.00 Using sort_union(ix2,PRIMARY); Using where with pushed condition: ((`test`.`x1`.`pk` = 1) or (`test`.`x1`.`u` = 1))
+1 SIMPLE x2 ref ix1 ix1 5 test.x1.a 1 100.00 Using where
+Warnings:
+Note 1644 Push of table 'x2' as scan-child with lookup-root 'x1' not implemented
+Note 1003 select count(0) AS `count(*)` from `test`.`t1` `x1` join `test`.`t1` `x2` where ((`test`.`x2`.`b` = `test`.`x1`.`a`) and ((`test`.`x1`.`pk` = 1) or (`test`.`x1`.`u` = 1)))
select count(*) from t1 as x1
join t1 as x2 on x1.a=x2.b
where x1.pk = 1 or x1.u=1;
count(*)
13
set ndb_join_pushdown=on;
-explain
+explain extended
select straight_join * from t1 as table1
left join
(t1 as table2 join t1 as table3 on table2.pk = table3.b)
on table1.pk = table2.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE table1 ALL NULL NULL NULL NULL 13
-1 SIMPLE table2 ref PRIMARY,ix1 ix1 5 test.table1.pk 1 Parent of 2 pushed join@1
-1 SIMPLE table3 ref ix1 ix1 5 test.table2.pk 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE table1 ALL NULL NULL NULL NULL 13 100.00
+1 SIMPLE table2 ref PRIMARY,ix1 ix1 5 test.table1.pk 1 100.00 Parent of 2 pushed join@1
+1 SIMPLE table3 ref ix1 ix1 5 test.table2.pk 1 100.00 Child of pushed join@1
+Warnings:
+Note 1644 Can't push table 'table2' as child of 'table1', outer join with scan-ancestor 'table1' not implemented
+Note 1644 Can't push table 'table3' as child of 'table1', column 'table2.pk' is outside scope of pushable join
+Note 1003 select straight_join `test`.`table1`.`pk` AS `pk`,`test`.`table1`.`u` AS `u`,`test`.`table1`.`a` AS `a`,`test`.`table1`.`b` AS `b`,`test`.`table2`.`pk` AS `pk`,`test`.`table2`.`u` AS `u`,`test`.`table2`.`a` AS `a`,`test`.`table2`.`b` AS `b`,`test`.`table3`.`pk` AS `pk`,`test`.`table3`.`u` AS `u`,`test`.`table3`.`a` AS `a`,`test`.`table3`.`b` AS `b` from `test`.`t1` `table1` left join (`test`.`t1` `table2` join `test`.`t1` `table3`) on(((`test`.`table1`.`pk` = `test`.`table2`.`b`) and (`test`.`table2`.`pk` = `test`.`table3`.`b`))) where 1
select straight_join * from t1 as table1
left join
(t1 as table2 join t1 as table3 on table2.pk = table3.b)
@@ -3524,44 +3898,59 @@ pk u a b pk u a b pk u a b
7 7 10 10 NULL NULL NULL NULL NULL NULL NULL NULL
8 8 10 10 NULL NULL NULL NULL NULL NULL NULL NULL
9 9 10 10 NULL NULL NULL NULL NULL NULL NULL NULL
-explain select straight_join * from t1 as x1
+explain extended select straight_join * from t1 as x1
inner join t1 as x2 on x2.b = x1.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x1 ALL NULL NULL NULL NULL 13 Parent of 2 pushed join@1
-1 SIMPLE x2 ref ix1 ix1 5 test.x1.a 1 Child of pushed join@1; Using where
-explain select straight_join * from t1 as x1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x1 ALL NULL NULL NULL NULL 13 100.00 Parent of 2 pushed join@1
+1 SIMPLE x2 ref ix1 ix1 5 test.x1.a 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select straight_join `test`.`x1`.`pk` AS `pk`,`test`.`x1`.`u` AS `u`,`test`.`x1`.`a` AS `a`,`test`.`x1`.`b` AS `b`,`test`.`x2`.`pk` AS `pk`,`test`.`x2`.`u` AS `u`,`test`.`x2`.`a` AS `a`,`test`.`x2`.`b` AS `b` from `test`.`t1` `x1` join `test`.`t1` `x2` where (`test`.`x2`.`b` = `test`.`x1`.`a`)
+explain extended select straight_join * from t1 as x1
left join t1 as x2 on x2.b = x1.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x1 ALL NULL NULL NULL NULL 13
-1 SIMPLE x2 ref ix1 ix1 5 test.x1.a 1
-explain select straight_join * from t1 as x1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x1 ALL NULL NULL NULL NULL 13 100.00
+1 SIMPLE x2 ref ix1 ix1 5 test.x1.a 1 100.00
+Warnings:
+Note 1644 Can't push table 'x2' as child of 'x1', outer join with scan-ancestor 'x1' not implemented
+Note 1003 select straight_join `test`.`x1`.`pk` AS `pk`,`test`.`x1`.`u` AS `u`,`test`.`x1`.`a` AS `a`,`test`.`x1`.`b` AS `b`,`test`.`x2`.`pk` AS `pk`,`test`.`x2`.`u` AS `u`,`test`.`x2`.`a` AS `a`,`test`.`x2`.`b` AS `b` from `test`.`t1` `x1` left join `test`.`t1` `x2` on((`test`.`x2`.`b` = `test`.`x1`.`a`)) where 1
+explain extended select straight_join * from t1 as x1
right join t1 as x2 on x2.b = x1.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x2 ALL NULL NULL NULL NULL 13
-1 SIMPLE x1 ALL NULL NULL NULL NULL 13
-explain select straight_join * from
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x2 ALL NULL NULL NULL NULL 13 100.00
+1 SIMPLE x1 ALL NULL NULL NULL NULL 13 100.00
+Warnings:
+Note 1644 Can't push table 'x1' as child, 'type' must be a 'ref' access
+Note 1003 select straight_join `test`.`x1`.`pk` AS `pk`,`test`.`x1`.`u` AS `u`,`test`.`x1`.`a` AS `a`,`test`.`x1`.`b` AS `b`,`test`.`x2`.`pk` AS `pk`,`test`.`x2`.`u` AS `u`,`test`.`x2`.`a` AS `a`,`test`.`x2`.`b` AS `b` from `test`.`t1` `x2` left join `test`.`t1` `x1` on((`test`.`x2`.`b` = `test`.`x1`.`a`)) where 1
+explain extended select straight_join * from
t1 as x1 inner join
(t1 as x2 inner join t1 as x3 on x3.b = x2.a)
on x2.pk = x1.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x1 ALL NULL NULL NULL NULL 13 Parent of 3 pushed join@1
-1 SIMPLE x2 eq_ref PRIMARY PRIMARY 4 test.x1.a 1 Child of pushed join@1
-1 SIMPLE x3 ref ix1 ix1 5 test.x2.a 1 Child of pushed join@1; Using where
-explain select straight_join * from
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x1 ALL NULL NULL NULL NULL 13 100.00 Parent of 3 pushed join@1
+1 SIMPLE x2 eq_ref PRIMARY PRIMARY 4 test.x1.a 1 100.00 Child of pushed join@1
+1 SIMPLE x3 ref ix1 ix1 5 test.x2.a 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select straight_join `test`.`x1`.`pk` AS `pk`,`test`.`x1`.`u` AS `u`,`test`.`x1`.`a` AS `a`,`test`.`x1`.`b` AS `b`,`test`.`x2`.`pk` AS `pk`,`test`.`x2`.`u` AS `u`,`test`.`x2`.`a` AS `a`,`test`.`x2`.`b` AS `b`,`test`.`x3`.`pk` AS `pk`,`test`.`x3`.`u` AS `u`,`test`.`x3`.`a` AS `a`,`test`.`x3`.`b` AS `b` from `test`.`t1` `x1` join `test`.`t1` `x2` join `test`.`t1` `x3` where ((`test`.`x3`.`b` = `test`.`x2`.`a`) and (`test`.`x2`.`pk` = `test`.`x1`.`a`))
+explain extended select straight_join * from
t1 as x1 left join
(t1 as x2 inner join t1 as x3 on x3.b = x2.a)
on x2.pk = x1.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x1 ALL NULL NULL NULL NULL 13 Parent of 2 pushed join@1
-1 SIMPLE x2 eq_ref PRIMARY PRIMARY 4 test.x1.a 1 Child of pushed join@1
-1 SIMPLE x3 ref ix1 ix1 5 test.x2.a 1
-explain select straight_join count(*) from t1 as x1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x1 ALL NULL NULL NULL NULL 13 100.00 Parent of 2 pushed join@1
+1 SIMPLE x2 eq_ref PRIMARY PRIMARY 4 test.x1.a 1 100.00 Child of pushed join@1
+1 SIMPLE x3 ref ix1 ix1 5 test.x2.a 1 100.00
+Warnings:
+Note 1644 Can't push table 'x3' as child of 'x1', outer join with scan-ancestor 'x1' not implemented
+Note 1003 select straight_join `test`.`x1`.`pk` AS `pk`,`test`.`x1`.`u` AS `u`,`test`.`x1`.`a` AS `a`,`test`.`x1`.`b` AS `b`,`test`.`x2`.`pk` AS `pk`,`test`.`x2`.`u` AS `u`,`test`.`x2`.`a` AS `a`,`test`.`x2`.`b` AS `b`,`test`.`x3`.`pk` AS `pk`,`test`.`x3`.`u` AS `u`,`test`.`x3`.`a` AS `a`,`test`.`x3`.`b` AS `b` from `test`.`t1` `x1` left join (`test`.`t1` `x2` join `test`.`t1` `x3`) on(((`test`.`x2`.`pk` = `test`.`x1`.`a`) and (`test`.`x3`.`b` = `test`.`x2`.`a`))) where 1
+explain extended select straight_join count(*) from t1 as x1
join t1 as x2 on x2.b = x1.a
join t1 as x3 on x3.b = x1.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x1 ALL ix1 NULL NULL NULL 13 Parent of 3 pushed join@1
-1 SIMPLE x2 ref ix1 ix1 5 test.x1.a 1 Child of pushed join@1; Using where
-1 SIMPLE x3 ref ix1 ix1 5 test.x1.b 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x1 ALL ix1 NULL NULL NULL 13 100.00 Parent of 3 pushed join@1
+1 SIMPLE x2 ref ix1 ix1 5 test.x1.a 1 100.00 Child of pushed join@1; Using where
+1 SIMPLE x3 ref ix1 ix1 5 test.x1.b 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select straight_join count(0) AS `count(*)` from `test`.`t1` `x1` join `test`.`t1` `x2` join `test`.`t1` `x3` where ((`test`.`x2`.`b` = `test`.`x1`.`a`) and (`test`.`x3`.`b` = `test`.`x1`.`b`))
set ndb_join_pushdown=off;
select straight_join count(*) from t1 as x1
join t1 as x2 on x2.b = x1.a
@@ -3574,13 +3963,16 @@ join t1 as x2 on x2.b = x1.a
join t1 as x3 on x3.b = x1.b;
count(*)
2028
-explain select straight_join count(*) from t1 as x1
+explain extended select straight_join count(*) from t1 as x1
left join t1 as x2 on x2.b = x1.a
join t1 as x3 on x3.b = x1.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x1 ALL ix1 NULL NULL NULL 13 Parent of 2 pushed join@1
-1 SIMPLE x2 ref ix1 ix1 5 test.x1.a 1
-1 SIMPLE x3 ref ix1 ix1 5 test.x1.b 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x1 ALL ix1 NULL NULL NULL 13 100.00 Parent of 2 pushed join@1
+1 SIMPLE x2 ref ix1 ix1 5 test.x1.a 1 100.00
+1 SIMPLE x3 ref ix1 ix1 5 test.x1.b 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1644 Can't push table 'x2' as child of 'x1', outer join with scan-ancestor 'x1' not implemented
+Note 1003 select straight_join count(0) AS `count(*)` from `test`.`t1` `x1` left join `test`.`t1` `x2` on((`test`.`x2`.`b` = `test`.`x1`.`a`)) join `test`.`t1` `x3` where (`test`.`x3`.`b` = `test`.`x1`.`b`)
set ndb_join_pushdown=off;
select straight_join count(*) from t1 as x1
left join t1 as x2 on x2.b = x1.a
@@ -3593,13 +3985,16 @@ left join t1 as x2 on x2.b = x1.a
join t1 as x3 on x3.b = x1.b;
count(*)
2041
-explain select straight_join count(*) from t1 as x1
+explain extended select straight_join count(*) from t1 as x1
join t1 as x2 on x2.b = x1.a
left join t1 as x3 on x3.b = x1.b;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x1 ALL NULL NULL NULL NULL 13 Parent of 2 pushed join@1
-1 SIMPLE x2 ref ix1 ix1 5 test.x1.a 1 Child of pushed join@1; Using where
-1 SIMPLE x3 ref ix1 ix1 5 test.x1.b 1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x1 ALL NULL NULL NULL NULL 13 100.00 Parent of 2 pushed join@1
+1 SIMPLE x2 ref ix1 ix1 5 test.x1.a 1 100.00 Child of pushed join@1; Using where
+1 SIMPLE x3 ref ix1 ix1 5 test.x1.b 1 100.00
+Warnings:
+Note 1644 Can't push table 'x3' as child of 'x1', outer join with scan-descendant 'x2' not implemented
+Note 1003 select straight_join count(0) AS `count(*)` from `test`.`t1` `x1` join `test`.`t1` `x2` left join `test`.`t1` `x3` on((`test`.`x3`.`b` = `test`.`x1`.`b`)) where (`test`.`x2`.`b` = `test`.`x1`.`a`)
set ndb_join_pushdown=off;
select straight_join count(*) from t1 as x1
join t1 as x2 on x2.b = x1.a
@@ -3612,15 +4007,18 @@ join t1 as x2 on x2.b = x1.a
left join t1 as x3 on x3.b = x1.b;
count(*)
2028
-explain
+explain extended
select straight_join count(*) from t1 as x1
join t1 as x2 on x2.b = x1.a
join t1 as x3 on x3.pk = x1.a join t1 as x4 on x4.b = x3.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x1 ALL NULL NULL NULL NULL 13 Parent of 3 pushed join@1
-1 SIMPLE x2 ref ix1 ix1 5 test.x1.a 1 Child of pushed join@1; Using where
-1 SIMPLE x3 eq_ref PRIMARY PRIMARY 4 test.x1.a 1 Child of pushed join@1
-1 SIMPLE x4 ref ix1 ix1 5 test.x3.a 1 Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x1 ALL NULL NULL NULL NULL 13 100.00 Parent of 3 pushed join@1
+1 SIMPLE x2 ref ix1 ix1 5 test.x1.a 1 100.00 Child of pushed join@1; Using where
+1 SIMPLE x3 eq_ref PRIMARY PRIMARY 4 test.x1.a 1 100.00 Child of pushed join@1
+1 SIMPLE x4 ref ix1 ix1 5 test.x3.a 1 100.00 Using where
+Warnings:
+Note 1644 Can't push table 'x4' as child of 'x1', implementation limitations due to bushy scan with 'x2' indirect through 'x1'
+Note 1003 select straight_join count(0) AS `count(*)` from `test`.`t1` `x1` join `test`.`t1` `x2` join `test`.`t1` `x3` join `test`.`t1` `x4` where ((`test`.`x2`.`b` = `test`.`x1`.`a`) and (`test`.`x3`.`pk` = `test`.`x1`.`a`) and (`test`.`x4`.`b` = `test`.`x3`.`a`))
set ndb_join_pushdown=off;
select straight_join count(*) from t1 as x1
join t1 as x2 on x2.b = x1.a
@@ -3633,13 +4031,16 @@ join t1 as x2 on x2.b = x1.a
join t1 as x3 on x3.pk = x1.a join t1 as x4 on x4.b = x3.a;
count(*)
2028
-explain select straight_join count(*) from t1 as x1
+explain extended select straight_join count(*) from t1 as x1
left join t1 as x3 on x3.b = x1.a
join t1 as x2 on x2.pk = x1.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x1 ALL NULL NULL NULL NULL 13 Parent of 2 pushed join@1
-1 SIMPLE x3 ref ix1 ix1 5 test.x1.a 1
-1 SIMPLE x2 eq_ref PRIMARY PRIMARY 4 test.x1.a 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x1 ALL NULL NULL NULL NULL 13 100.00 Parent of 2 pushed join@1
+1 SIMPLE x3 ref ix1 ix1 5 test.x1.a 1 100.00
+1 SIMPLE x2 eq_ref PRIMARY PRIMARY 4 test.x1.a 1 100.00 Child of pushed join@1
+Warnings:
+Note 1644 Can't push table 'x3' as child of 'x1', outer join with scan-ancestor 'x1' not implemented
+Note 1003 select straight_join count(0) AS `count(*)` from `test`.`t1` `x1` left join `test`.`t1` `x3` on(((`test`.`x3`.`b` = `test`.`x1`.`a`) and (`test`.`x2`.`pk` = `test`.`x1`.`a`))) join `test`.`t1` `x2` where (`test`.`x2`.`pk` = `test`.`x1`.`a`)
select straight_join count(*) from t1 as x1
left join t1 as x3 on x3.b = x1.a
join t1 as x2 on x2.pk = x1.a;
@@ -3654,13 +4055,15 @@ count(*)
update t1 set b=b-10;
update t1 set u=u+100;
set ndb_join_pushdown=on;
-explain select count(*) from
+explain extended select count(*) from
(t1 as x join t1 as y on y.b = x.a)
left outer join t1 as z on z.u = x.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ALL NULL NULL NULL NULL 13 Parent of 3 pushed join@1
-1 SIMPLE y ref ix1 ix1 5 test.x.a 1 Child of pushed join@1; Using where
-1 SIMPLE z eq_ref ix2 ix2 4 test.y.b 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ALL NULL NULL NULL NULL 13 100.00 Parent of 3 pushed join@1
+1 SIMPLE y ref ix1 ix1 5 test.x.a 1 100.00 Child of pushed join@1; Using where
+1 SIMPLE z eq_ref ix2 ix2 4 test.y.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select count(0) AS `count(*)` from `test`.`t1` `x` join `test`.`t1` `y` left join `test`.`t1` `z` on(((`test`.`y`.`b` = `test`.`x`.`a`) and (`test`.`z`.`u` = `test`.`x`.`a`))) where (`test`.`y`.`b` = `test`.`x`.`a`)
select count(*) from
(t1 as x join t1 as y on y.b = x.a)
left outer join t1 as z on z.u = x.a;
@@ -3670,16 +4073,20 @@ update t1 set u=u-100;
drop index ix2 on t1;
create unique index ix2 on t1(a,u);
set ndb_join_pushdown=on;
-explain
+explain extended
select straight_join * from
t1 as table1 join
(t1 as table2 join t1 as table3 on table3.a = table2.a)
on table3.u = table1.u
where table2.pk = 3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE table1 ALL NULL NULL NULL NULL 13
-1 SIMPLE table2 const PRIMARY,ix2 PRIMARY 4 const 1 Parent of 2 pushed join@1
-1 SIMPLE table3 ref ix2 ix2 9 test.table2.a,test.table1.u 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE table1 ALL NULL NULL NULL NULL 13 100.00
+1 SIMPLE table2 const PRIMARY,ix2 PRIMARY 4 const 1 100.00 Parent of 2 pushed join@1
+1 SIMPLE table3 ref ix2 ix2 9 test.table2.a,test.table1.u 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1644 Can't push table 'table2' as child of 'table1', their dependency is 'const'
+Note 1644 Can't push table 'table3' as child of 'table1', column 'table2.a' is outside scope of pushable join
+Note 1003 select straight_join `test`.`table1`.`pk` AS `pk`,`test`.`table1`.`u` AS `u`,`test`.`table1`.`a` AS `a`,`test`.`table1`.`b` AS `b`,`test`.`table2`.`pk` AS `pk`,`test`.`table2`.`u` AS `u`,`test`.`table2`.`a` AS `a`,`test`.`table2`.`b` AS `b`,`test`.`table3`.`pk` AS `pk`,`test`.`table3`.`u` AS `u`,`test`.`table3`.`a` AS `a`,`test`.`table3`.`b` AS `b` from `test`.`t1` `table1` join `test`.`t1` `table2` join `test`.`t1` `table3` where ((`test`.`table3`.`a` = `test`.`table2`.`a`) and (`test`.`table3`.`u` = `test`.`table1`.`u`) and (`test`.`table2`.`pk` = 3))
select straight_join * from
t1 as table1 join
(t1 as table2 join t1 as table3 on table3.a = table2.a)
@@ -3718,11 +4125,13 @@ insert into t1(a,b,c,d,e,f) values
(6, 7, 8, 1, 2, 3),
(7, 8, 9, 1, 2, 3);
set ndb_join_pushdown=on;
-explain
+explain extended
select straight_join * from t1 x, t1 y where y.a=x.d and y.b=x.e;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ALL NULL NULL NULL NULL 8 Parent of 2 pushed join@1
-1 SIMPLE y ref PRIMARY PRIMARY 8 test.x.d,test.x.e 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ALL NULL NULL NULL NULL 8 25.00 Parent of 2 pushed join@1
+1 SIMPLE y ref PRIMARY PRIMARY 8 test.x.d,test.x.e 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select straight_join `test`.`x`.`d` AS `d`,`test`.`x`.`e` AS `e`,`test`.`x`.`f` AS `f`,`test`.`x`.`a` AS `a`,`test`.`x`.`b` AS `b`,`test`.`x`.`c` AS `c`,`test`.`y`.`d` AS `d`,`test`.`y`.`e` AS `e`,`test`.`y`.`f` AS `f`,`test`.`y`.`a` AS `a`,`test`.`y`.`b` AS `b`,`test`.`y`.`c` AS `c` from `test`.`t1` `x` join `test`.`t1` `y` where ((`test`.`y`.`b` = `test`.`x`.`e`) and (`test`.`y`.`a` = `test`.`x`.`d`))
select straight_join * from t1 x, t1 y where y.a=x.d and y.b=x.e;
d e f a b c d e f a b c
1 2 3 1 2 3 1 2 3 1 2 3
@@ -3878,11 +4287,13 @@ d e f a b c d e f a b c
alter table t1 drop primary key, add primary key using hash (d,b,a,c);
alter table t1 partition by key (b);
create index ix1 on t1(b,d,a);
-explain
+explain extended
select straight_join * from t1 x, t1 y where y.a=x.d and y.b=x.e;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x ALL PRIMARY NULL NULL NULL 8 Parent of 2 pushed join@1
-1 SIMPLE y ref ix1 ix1 4 test.x.e 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x ALL PRIMARY NULL NULL NULL 8 100.00 Parent of 2 pushed join@1
+1 SIMPLE y ref ix1 ix1 4 test.x.e 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select straight_join `test`.`x`.`d` AS `d`,`test`.`x`.`e` AS `e`,`test`.`x`.`f` AS `f`,`test`.`x`.`a` AS `a`,`test`.`x`.`b` AS `b`,`test`.`x`.`c` AS `c`,`test`.`y`.`d` AS `d`,`test`.`y`.`e` AS `e`,`test`.`y`.`f` AS `f`,`test`.`y`.`a` AS `a`,`test`.`y`.`b` AS `b`,`test`.`y`.`c` AS `c` from `test`.`t1` `x` join `test`.`t1` `y` where ((`test`.`y`.`b` = `test`.`x`.`e`) and (`test`.`y`.`a` = `test`.`x`.`d`))
insert into t1(a,b,c,d,e,f) values
(8, 9, 0, 1, NULL, 3),
(9, 9, 0, 1, 2, NULL);
@@ -3924,14 +4335,16 @@ insert into t1 values (6,10,10);
insert into t1 values (7,10,10);
insert into t1 values (8,10,20);
insert into t1 values (9,10,10);
-explain select x1.pk,x1.a,x1.b from t1 as x1
+explain extended select x1.pk,x1.a,x1.b from t1 as x1
join t1 as x2 on x1.a=x2.b
join t1 as x3 on x2.a=x3.b
order by x1.pk limit 70;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x1 index NULL PRIMARY 4 NULL 10 Parent of 3 pushed join@1; Using temporary; Using filesort
-1 SIMPLE x2 ref ix1 ix1 5 test.x1.a 1 Child of pushed join@1; Using where
-1 SIMPLE x3 ref ix1 ix1 5 test.x2.a 1 Child of pushed join@1; Using where
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x1 index NULL PRIMARY 4 NULL 10 20.00 Parent of 3 pushed join@1; Using temporary; Using filesort
+1 SIMPLE x2 ref ix1 ix1 5 test.x1.a 1 100.00 Child of pushed join@1; Using where
+1 SIMPLE x3 ref ix1 ix1 5 test.x2.a 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select `test`.`x1`.`pk` AS `pk`,`test`.`x1`.`a` AS `a`,`test`.`x1`.`b` AS `b` from `test`.`t1` `x1` join `test`.`t1` `x2` join `test`.`t1` `x3` where ((`test`.`x2`.`b` = `test`.`x1`.`a`) and (`test`.`x3`.`b` = `test`.`x2`.`a`)) order by `test`.`x1`.`pk` limit 70
select x1.pk,x1.a,x1.b from t1 as x1
join t1 as x2 on x1.a=x2.b
join t1 as x3 on x2.a=x3.b
@@ -4007,10 +4420,12 @@ pk a b
2 20 20
2 20 20
2 20 20
-explain select * from t1 as x1, t1 as x2 where x1.a=x2.b and x1.b = 3;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x1 ref ix1 ix1 5 const 10 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE x2 ref ix1 ix1 5 test.x1.a 1 Child of pushed join@1; Using where
+explain extended select * from t1 as x1, t1 as x2 where x1.a=x2.b and x1.b = 3;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x1 ref ix1 ix1 5 const 10 100.00 Parent of 2 pushed join@1; Using where with pushed condition: (`test`.`x1`.`b` = 3)
+1 SIMPLE x2 ref ix1 ix1 5 test.x1.a 1 100.00 Child of pushed join@1; Using where
+Warnings:
+Note 1003 select `test`.`x1`.`pk` AS `pk`,`test`.`x1`.`a` AS `a`,`test`.`x1`.`b` AS `b`,`test`.`x2`.`pk` AS `pk`,`test`.`x2`.`a` AS `a`,`test`.`x2`.`b` AS `b` from `test`.`t1` `x1` join `test`.`t1` `x2` where ((`test`.`x1`.`b` = 3) and (`test`.`x2`.`b` = `test`.`x1`.`a`))
select * from t1 as x1, t1 as x2 where x1.a=x2.b and x1.b = 3;
pk a b pk a b
drop table t1;
@@ -4019,7 +4434,7 @@ insert into t values
(1,1), (2,1),
(4,3), (6,3),
(7,4), (8,4);
-explain
+explain extended
SELECT DISTINCT STRAIGHT_JOIN table1.pk FROM
t AS table1 JOIN
(t AS table2 JOIN
@@ -4027,11 +4442,15 @@ t AS table1 JOIN
ON table2.pk = table3.pk )
ON table1.a = table4.pk
WHERE table2.pk != 6;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE table1 ALL NULL NULL NULL NULL 6 Parent of 2 pushed join@1; Using temporary
-1 SIMPLE table2 range PRIMARY PRIMARY 4 NULL 2 Parent of 2 pushed join@2; Using where with pushed condition; Distinct
-1 SIMPLE table3 eq_ref PRIMARY PRIMARY 4 test.table2.pk 1 Child of pushed join@2; Distinct
-1 SIMPLE table4 eq_ref PRIMARY PRIMARY 4 test.table1.a 1 Child of pushed join@1; Using where; Distinct
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE table1 ALL NULL NULL NULL NULL 6 33.33 Parent of 2 pushed join@1; Using temporary
+1 SIMPLE table2 range PRIMARY PRIMARY 4 NULL 2 100.00 Parent of 2 pushed join@2; Using where with pushed condition: (`test`.`table2`.`pk` <> 6); Distinct
+1 SIMPLE table3 eq_ref PRIMARY PRIMARY 4 test.table2.pk 1 100.00 Child of pushed join@2; Distinct
+1 SIMPLE table4 eq_ref PRIMARY PRIMARY 4 test.table1.a 1 100.00 Child of pushed join@1; Using where; Distinct
+Warnings:
+Note 1644 Can't push table 'table2' as child, 'type' must be a 'ref' access
+Note 1644 Can't push table 'table3' as child of 'table1', column 'table2.pk' is outside scope of pushable join
+Note 1003 select straight_join distinct `test`.`table1`.`pk` AS `pk` from `test`.`t` `table1` join `test`.`t` `table2` join `test`.`t` `table3` join `test`.`t` `table4` where ((`test`.`table3`.`pk` = `test`.`table2`.`pk`) and (`test`.`table4`.`a` = `test`.`table2`.`pk`) and (`test`.`table4`.`pk` = `test`.`table1`.`a`) and (`test`.`table2`.`pk` <> 6))
SELECT DISTINCT STRAIGHT_JOIN table1.pk FROM
t AS table1 JOIN
(t AS table2 JOIN
@@ -4045,11 +4464,13 @@ pk
drop table t;
create table t (b int, a int, primary key (a,b)) engine=ndb;
insert into t values(0,0);
-explain
+explain extended
select * from t as t1 join t as t2 on t2.a=t1.a where t1.a < 8 or t1.a >= 8;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range PRIMARY PRIMARY 0 NULL 10 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE t1 range PRIMARY PRIMARY 0 NULL 10 20.00 Parent of 2 pushed join@1; Using where with pushed condition: ((`test`.`t1`.`a` < 8) or (`test`.`t1`.`a` >= 8))
+1 SIMPLE t2 ref PRIMARY PRIMARY 4 test.t1.a 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`a` AS `a` from `test`.`t` `t1` join `test`.`t` `t2` where ((`test`.`t2`.`a` = `test`.`t1`.`a`) and ((`test`.`t1`.`a` < 8) or (`test`.`t1`.`a` >= 8)))
select * from t as t1 join t as t2 on t2.a=t1.a where t1.a < 8 or t1.a >= 8;
b a b a
0 0 0 0
@@ -4062,13 +4483,17 @@ PRIMARY KEY (a),
UNIQUE KEY uk1 (b, c)
)ENGINE=ndbcluster;
insert into tc values ('aa','bb', 'x'), ('bb','cc', 'x'), ('cc', 'dd', 'x');
-explain select * from tc as x1
+explain extended select * from tc as x1
right outer join tc as x2 on x1.b=x2.a
left outer join tc as x3 on x2.b = x3.b and x1.c=x3.c;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x2 ALL NULL NULL NULL NULL 3
-1 SIMPLE x1 ref uk1 uk1 13 test.x2.a 1 Parent of 2 pushed join@1
-1 SIMPLE x3 ref uk1 uk1 26 test.x2.b,test.x1.c 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x2 ALL NULL NULL NULL NULL 3 100.00
+1 SIMPLE x1 ref uk1 uk1 13 test.x2.a 1 100.00 Parent of 2 pushed join@1
+1 SIMPLE x3 ref uk1 uk1 26 test.x2.b,test.x1.c 1 100.00 Child of pushed join@1
+Warnings:
+Note 1644 Can't push table 'x1' as child of 'x2', outer join with scan-ancestor 'x2' not implemented
+Note 1644 Can't push table 'x3' as child of 'x2', column 'x1.c' is outside scope of pushable join
+Note 1003 select `test`.`x1`.`a` AS `a`,`test`.`x1`.`b` AS `b`,`test`.`x1`.`c` AS `c`,`test`.`x2`.`a` AS `a`,`test`.`x2`.`b` AS `b`,`test`.`x2`.`c` AS `c`,`test`.`x3`.`a` AS `a`,`test`.`x3`.`b` AS `b`,`test`.`x3`.`c` AS `c` from `test`.`tc` `x2` left join `test`.`tc` `x1` on((`test`.`x1`.`b` = `test`.`x2`.`a`)) left join `test`.`tc` `x3` on(((`test`.`x2`.`b` = `test`.`x3`.`b`) and (`test`.`x1`.`c` = `test`.`x3`.`c`))) where 1
select * from tc as x1
right outer join tc as x2 on x1.b=x2.a
left outer join tc as x3 on x2.b = x3.b and x1.c=x3.c;
@@ -4076,14 +4501,20 @@ a b c a b c a b c
NULL NULL NULL aa bb x NULL NULL NULL
aa bb x bb cc x bb cc x
bb cc x cc dd x cc dd x
-explain select * from tc as x1, tc as x2 where x1.b=x2.a for update;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x1 ALL uk1 NULL NULL NULL 3
-1 SIMPLE x2 eq_ref PRIMARY PRIMARY 12 test.x1.b 1
-explain select * from tc as x1, tc as x2 where x1.b=x2.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE x1 ALL uk1 NULL NULL NULL 3 Parent of 2 pushed join@1
-1 SIMPLE x2 eq_ref PRIMARY PRIMARY 12 test.x1.b 1 Child of pushed join@1
+explain extended select * from tc as x1, tc as x2 where x1.b=x2.a for update;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x1 ALL uk1 NULL NULL NULL 3 100.00
+1 SIMPLE x2 eq_ref PRIMARY PRIMARY 12 test.x1.b 1 100.00
+Warnings:
+Note 1644 Table 'x1' is not pushable, lock modes other than 'read committed' not implemented
+Note 1644 Table 'x2' is not pushable, lock modes other than 'read committed' not implemented
+Note 1003 select `test`.`x1`.`a` AS `a`,`test`.`x1`.`b` AS `b`,`test`.`x1`.`c` AS `c`,`test`.`x2`.`a` AS `a`,`test`.`x2`.`b` AS `b`,`test`.`x2`.`c` AS `c` from `test`.`tc` `x1` join `test`.`tc` `x2` where (`test`.`x2`.`a` = `test`.`x1`.`b`)
+explain extended select * from tc as x1, tc as x2 where x1.b=x2.a;
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE x1 ALL uk1 NULL NULL NULL 3 100.00 Parent of 2 pushed join@1
+1 SIMPLE x2 eq_ref PRIMARY PRIMARY 12 test.x1.b 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`x1`.`a` AS `a`,`test`.`x1`.`b` AS `b`,`test`.`x1`.`c` AS `c`,`test`.`x2`.`a` AS `a`,`test`.`x2`.`b` AS `b`,`test`.`x2`.`c` AS `c` from `test`.`tc` `x1` join `test`.`tc` `x2` where (`test`.`x2`.`a` = `test`.`x1`.`b`)
drop table tc;
create table t1 (
a varchar(16) not null,
@@ -4093,11 +4524,13 @@ d int not null,
primary key (a,b)
) engine ndb partition by key (a);
insert into t1 values ('aaa', 1, 'aaa', 1);
-explain
+explain extended
select * from t1 as q1, t1 as q2 where q1.a = 'aaa' and q1.c=q2.a;
-id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE q1 ref PRIMARY PRIMARY 18 const 10 Parent of 2 pushed join@1; Using where with pushed condition
-1 SIMPLE q2 ref PRIMARY PRIMARY 18 test.q1.c 1 Child of pushed join@1
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 SIMPLE q1 ref PRIMARY PRIMARY 18 const 10 100.00 Parent of 2 pushed join@1; Using where with pushed condition: (`test`.`q1`.`a` = 'aaa')
+1 SIMPLE q2 ref PRIMARY PRIMARY 18 test.q1.c 1 100.00 Child of pushed join@1
+Warnings:
+Note 1003 select `test`.`q1`.`a` AS `a`,`test`.`q1`.`b` AS `b`,`test`.`q1`.`c` AS `c`,`test`.`q1`.`d` AS `d`,`test`.`q2`.`a` AS `a`,`test`.`q2`.`b` AS `b`,`test`.`q2`.`c` AS `c`,`test`.`q2`.`d` AS `d` from `test`.`t1` `q1` join `test`.`t1` `q2` where ((`test`.`q2`.`a` = `test`.`q1`.`c`) and (`test`.`q1`.`a` = 'aaa'))
select * from t1 as q1, t1 as q2 where q1.a = 'aaa' and q1.c=q2.a;
a b c d a b c d
aaa 1 aaa 1 aaa 1 aaa 1
@@ -4134,7 +4567,7 @@ LOCAL+REMOTE READS_SENT
drop table spj_counts_at_startup;
drop table spj_counts_at_end;
scan_count
-2013
+2014
pruned_scan_count
8
sorted_scan_count
=== modified file 'mysql-test/suite/ndb/t/ndb_join_pushdown.test'
--- a/mysql-test/suite/ndb/t/ndb_join_pushdown.test 2010-11-06 09:24:09 +0000
+++ b/mysql-test/suite/ndb/t/ndb_join_pushdown.test 2010-11-08 15:13:37 +0000
@@ -60,7 +60,7 @@ insert into t1 values
(3,1,1,2), (3,2,2,3), (3,4,3,4),
(4,1,4,5), (4,2,5,1), (4,3,1,2);
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c;
@@ -69,7 +69,7 @@ select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c;
-explain
+explain extended
select *
from t1
left join t1 as t2 on t2.a = t1.b and t2.b = t1.c;
@@ -78,7 +78,7 @@ select *
from t1
left join t1 as t2 on t2.a = t1.b and t2.b = t1.c;
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -89,7 +89,7 @@ from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
join t1 as t3 on t3.a = t2.a and t3.b = t2.b;
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -100,7 +100,7 @@ from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
left join t1 as t3 on t3.a = t2.a and t3.b = t2.b;
-explain
+explain extended
select *
from t1
left join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -112,7 +112,12 @@ left join t1 as t2 on t2.a = t1.b and t2
left join t1 as t3 on t3.a = t2.a and t3.b = t2.b;
set ndb_join_pushdown=true;
-explain
+explain extended
+select *
+from t1
+join t1 as t2 on t2.a = t1.c and t2.b = t1.d procedure analyse();
+
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
@@ -122,7 +127,7 @@ from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.a = 2 and t1.b = 3;
-explain
+explain extended
select *
from t1
left join t1 as t2 on t2.a = t1.c and t2.b = t1.d
@@ -132,7 +137,7 @@ from t1
left join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.a = 2 and t1.b = 3;
-explain
+explain extended
select *
from t1
left join t1 as t2 on t2.a = t1.c and t2.b = t1.d
@@ -145,7 +150,7 @@ where t1.a = 2 and t1.b = 3
order by t1.c;
set ndb_join_pushdown=false;
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
@@ -155,7 +160,7 @@ from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.a = 2 and t1.b = 3;
-explain
+explain extended
select *
from t1
left join t1 as t2 on t2.a = t1.c and t2.b = t1.d
@@ -166,7 +171,7 @@ left join t1 as t2 on t2.a = t1.c and t2
where t1.a = 2 and t1.b = 3;
set ndb_join_pushdown=true;
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
@@ -176,7 +181,7 @@ from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.a = 1 and t1.b = 1;
-explain
+explain extended
select *
from t1
left join t1 as t2 on t2.a = t1.c and t2.b = t1.d
@@ -187,7 +192,7 @@ left join t1 as t2 on t2.a = t1.c and t2
where t1.a = 1 and t1.b = 1;
set ndb_join_pushdown=false;
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
@@ -197,7 +202,7 @@ from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.a = 1 and t1.b = 1;
-explain
+explain extended
select *
from t1
left join t1 as t2 on t2.a = t1.c and t2.b = t1.d
@@ -214,7 +219,7 @@ where t1.a = 1 and t1.b = 1;
## should be consulted in order to replace 't1.c' with 't2.a'
## inside the scope
set ndb_join_pushdown=true;
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.c
@@ -231,7 +236,7 @@ join t1 as t3 on t3.a = t1.c and t3.b =
## (pseudo constant) paramValue wrt. the pushed join.
## As we have a dependency on previous rows these
## should not be join cached (ref. HA_PUSH_BLOCK_JOINCACHE)
-explain
+explain extended
select STRAIGHT_JOIN *
FROM (t1 as X CROSS JOIN t1 as Y)
JOIN t1 as Z ON Z.a=X.a and Z.b=Y.b;
@@ -246,7 +251,7 @@ select STRAIGHT_JOIN *
## these tests t3 is also linked with t2 through another join condition.
## This makes t3 join pushable by specifying the value of t1.c as a
## paramValue()
-explain
+explain extended
select *
from t1
straight_join t1 as t2 on t2.a = t1.b+0 and t2.b = t1.c
@@ -257,7 +262,7 @@ from t1
straight_join t1 as t2 on t2.a = t1.b+0 and t2.b = t1.c
straight_join t1 as t3 on t3.a = t1.b and t3.b = t2.b;
-explain
+explain extended
select *
from t1
straight_join t1 as t2 on t2.a = t1.b+0 and t2.b = t1.c
@@ -270,7 +275,7 @@ from t1
straight_join t1 as t3 on t3.a = t1.b and t3.b = t2.b
where t1.a=1 and t1.d=1;
-explain
+explain extended
select *
from t1
straight_join t1 as t2 on t2.a = t1.b+0
@@ -307,7 +312,7 @@ insert into t1_myisam values
set ndb_join_pushdown=true;
-explain
+explain extended
select *
from t1_myisam as t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
@@ -331,7 +336,7 @@ drop table t1_myisam;
set ndb_join_pushdown=true;
# Table scan
-explain select *
+explain extended select *
from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.d = 3;
@@ -342,7 +347,7 @@ join t1 as t2 on t2.a = t1.c and t2.b =
where t1.d = 3;
# Ordered index scan
-explain select *
+explain extended select *
from t1
join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.a > 2 and t1.d = 3;
@@ -353,7 +358,7 @@ join t1 as t2 on t2.a = t1.c and t2.b =
where t1.a > 2 and t1.d = 3;
# Sorted scan of ordered index.
-explain select *
+explain extended select *
from t1 join t1 as t2 on t2.a = t1.c and t2.b = t1.d
where t1.d = 3
order by t1.a;
@@ -370,7 +375,7 @@ order by t1.a;
# SQL stmt. are therefore written with pushable JT_REFs from table 2 ->
#
set ndb_join_pushdown=true;
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.c
@@ -383,7 +388,7 @@ join t1 as t2 on t2.a = t1.c
join t1 as t3 on t3.a = t2.c and t3.b = t2.d
where t1.a = 1 and t1.b = 1;
-explain
+explain extended
select *
from t1
left join t1 as t2 on t2.a = t1.c
@@ -397,7 +402,7 @@ left join t1 as t3 on t3.a = t2.c and t3
where t1.a = 1 and t1.b = 1;
set ndb_join_pushdown=false;
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.c
@@ -410,7 +415,7 @@ join t1 as t2 on t2.a = t1.c
join t1 as t3 on t3.a = t2.c and t3.b = t2.d
where t1.a = 1 and t1.b = 1;
-explain
+explain extended
select *
from t1
left join t1 as t2 on t2.a = t1.c
@@ -425,7 +430,7 @@ where t1.a = 1 and t1.b = 1;
# JT_REF as root operations is now supported as pushed joins
set ndb_join_pushdown=true;
-explain
+explain extended
select *
from t1 as t2
join t1 as t3 on t3.a = t2.c and t3.b = t2.d
@@ -448,7 +453,7 @@ set ndb_join_pushdown=true;
# t3 refer both t1,t2 as parrent.
# t1 should be identifed as a grandparent available
# through its child t2.
-explain
+explain extended
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
@@ -461,7 +466,7 @@ from t1
# t4 is NOT pushable as t2 & t3 does not have
# a parent / grandparent relationship
-explain
+explain extended
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
@@ -476,7 +481,7 @@ from t1
# t3 is a child of t2 and grandchild of t1
# t4 is a child of t3 and grandchild of t2
-explain
+explain extended
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
@@ -491,7 +496,7 @@ from t1
# t3 is a child of t2 and grandchild of t1
# t4 is a child of t3 and grandgrandchild of t1
-explain
+explain extended
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
@@ -512,7 +517,7 @@ from t1
# provide multiple similar testcases and hope that
# some of them will trigger the replacement code in
# ha_ndbcluster :-o
-explain
+explain extended
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
@@ -525,7 +530,7 @@ from t1
join t1 as t3 on t3.a = t1.c and t3.b = t1.d
join t1 as t4 on t4.a = t3.a and t4.b = t2.c;
-explain
+explain extended
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
@@ -538,7 +543,7 @@ from t1
join t1 as t3 on t3.a = t1.c and t3.b = t1.d
join t1 as t4 on t4.a = t3.b and t4.b = t2.c;
-explain
+explain extended
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
@@ -551,7 +556,7 @@ from t1
join t1 as t3 on t3.a = t1.c and t3.b = t1.d
join t1 as t4 on t4.a = t3.c and t4.b = t2.a;
-explain
+explain extended
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
@@ -564,7 +569,7 @@ from t1
join t1 as t3 on t3.a = t1.c and t3.b = t1.d
join t1 as t4 on t4.a = t3.c and t4.b = t2.b;
-explain
+explain extended
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
@@ -577,7 +582,7 @@ from t1
join t1 as t3 on t3.a = t1.c and t3.b = t1.d
join t1 as t4 on t4.a = t1.c and t4.b = t2.c;
-explain
+explain extended
select straight_join *
from t1
join t1 as t2 on t2.a = t1.a and t2.b = t1.b
@@ -595,7 +600,7 @@ from t1
# & pushed EQ-bound (indexScan) (z, t1)
# This used to give incorrect results with random result for last table (t1)
set ndb_join_pushdown=true;
-explain
+explain extended
select * from t1 x, t1 y, t1 z, t1 where
y.a=x.d and y.b=x.b and
z.a=y.d and
@@ -607,7 +612,7 @@ explain
t1.a = z.d and t1.b=z.b;
# Pushed scanIndex() with (multi-)range:
-explain
+explain extended
select * from t1 x, t1 y where
x.a <= 2 and
y.a=x.d and y.b=x.b;
@@ -616,7 +621,7 @@ explain
x.a <= 2 and
y.a=x.d and y.b=x.b;
-explain
+explain extended
select * from t1 x, t1 y where
(x.a <= 2 or x.a > 3) and
y.a=x.d and y.b=x.b;
@@ -626,7 +631,7 @@ explain
y.a=x.d and y.b=x.b;
# 'open' range:
-explain
+explain extended
select * from t1 x, t1 y where
(x.a >= 2 or x.a < 3) and
y.a=x.d and y.b=x.b;
@@ -636,7 +641,7 @@ explain
y.a=x.d and y.b=x.b;
# Combination of range and 'in' list
-explain
+explain extended
select * from t1 x, t1 y where
(x.a <= 2 or x.a in (0,5,4)) and
y.a=x.d and y.b=x.b;
@@ -648,7 +653,7 @@ explain
# Combination of range and 'in' list with exact match
# NOTE: Due to simplification in pushed mrr, exact matches are also
# executed as range scans
-explain
+explain extended
select * from t1 x, t1 y where
(x.a <= 2 or (x.a,x.b) in ((0,0),(5,0),(4,3))) and
y.a=x.d and y.b=x.b;
@@ -678,7 +683,7 @@ explain
#
## pushed join w/ 'simple order' on non_PK - Need temp table + filesort
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -694,7 +699,7 @@ order by t1.c,t1.d,
t1.a, t1.b;
## pushed join w/ non-'simple order' on non_PK - Need temp table + filesort
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -710,7 +715,7 @@ order by t1.c,t2.d,
t1.a, t1.b;
## pushed join w/ 'simple order' on PK - Should use ordered index scan
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -724,7 +729,7 @@ join t1 as t3 on t3.a = t2.a and t3.b =
order by t1.a,t1.b;
## pushed join w/ non-'simple order' on PK - will need temp table + filesort
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -740,7 +745,7 @@ order by t1.a,t2.b,
t1.a, t1.b;
## Descending ordering on PK - use reversed ordered index scan
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -754,7 +759,7 @@ join t1 as t3 on t3.a = t2.a and t3.b =
order by t1.a desc,t1.b desc;
## PK column in incorrect order, -> filesort to tempfile
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -770,7 +775,7 @@ order by t1.b,t1.a;
## Explore other permutations of PK columns in ORDER BY clause
## Don't care about the results here....
# Subset of first part of PK -> ordered index scan
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -778,7 +783,7 @@ join t1 as t3 on t3.a = t2.a and t3.b =
order by t1.a;
# PK columns not including first part -> filesort to tempfile
-explain
+explain extended
select *
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -790,7 +795,7 @@ order by t1.b;
## PK grouping (or subpart) may be optimized
## by ordered index access.
##
-explain
+explain extended
select t1.a, t1.b, count(*)
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -803,7 +808,7 @@ join t1 as t2 on t2.a = t1.b and t2.b =
join t1 as t3 on t3.a = t2.a and t3.b = t2.b
group by t1.a, t1.b;
-explain
+explain extended
select t1.a, count(*)
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -816,7 +821,7 @@ join t1 as t2 on t2.a = t1.b and t2.b =
join t1 as t3 on t3.a = t2.a and t3.b = t2.b
group by t1.a;
-explain
+explain extended
select t1.b, count(*)
from t1
join t1 as t2 on t2.a = t1.b and t2.b = t1.c
@@ -829,7 +834,7 @@ join t1 as t2 on t2.a = t1.b and t2.b =
join t1 as t3 on t3.a = t2.a and t3.b = t2.b
group by t1.b;
-explain
+explain extended
select t2.c, count(distinct t2.a)
from t1
join t1 as t2 on t1.a = t2.c and t1.b = t2.d
@@ -842,7 +847,7 @@ join t1 as t2 on t1.a = t2.c and t1.b =
where t2.a = 4 and t2.b=4
group by t2.c;
-explain
+explain extended
select t2.c, count(distinct t2.a)
from t1
join t1 as t2 on t1.a = t2.c and t1.b = t2.d
@@ -855,7 +860,7 @@ join t1 as t2 on t1.a = t2.c and t1.b =
where t2.a = 4
group by t2.c;
-explain
+explain extended
select t2.c, count(distinct t2.a)
from t1
join t1 as t2 on t1.a = t2.c and t1.b = t2.d
@@ -882,7 +887,7 @@ insert into t1 values (3, 1);
set ndb_join_pushdown=true;
-explain
+explain extended
select *
from t1, t1 as t2
where t1.a in (1,3,5)
@@ -903,7 +908,7 @@ insert into t1 values (3, 1);
set ndb_join_pushdown=true;
-explain
+explain extended
select *
from t1, t1 as t2
where t1.a in (1,3,5)
@@ -922,7 +927,7 @@ where t1.a in (1,3,5)
## join execution (EXPLAIN still says 'pushdown') which
## should test handling of this in ha_ndbcluster::index_read_pushed()
-explain
+explain extended
select *
from t1, t1 as t2
where t1.a in (1,3,5)
@@ -962,12 +967,12 @@ insert into t3_hash values (0x1f, 0x2f,
insert into t3_hash values (0x2f, 0x3f, 2, 0x2f);
insert into t3_hash values (0x3f, 0x1f, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y, t1 where y.a3=x.d3 and y.b3=x.b3 and t1.a = y.d3;
--sorted_result
select * from t3 x, t3 y, t1 where y.a3=x.d3 and y.b3=x.b3 and t1.a = y.d3;
-explain
+explain extended
select *
from t3 x, t3 y, t3 z, t3 z2, t1
where y.a3=x.d3 and y.b3=x.b3 and
@@ -983,13 +988,13 @@ where y.a3=x.d3 and y.b3=x.b3 and
t1.a = z2.d3;
# Table expressions wo/ parent-child linkage should *not* be executes as a pushed join:
-explain
+explain extended
select straight_join * from t1 x, t1 y where y.a=0x1f and x.b = 0x1f;
select straight_join * from t1 x, t1 y where y.a=0x1f and x.b = 0x1f;
# NOTE: Due to constValue replacement in equality sets, query below are
# effectively the same as the one above. -> Don't push either
-explain
+explain extended
select straight_join * from t1 x, t1 y where y.a=x.b and x.b = 0x1f;
select straight_join * from t1 x, t1 y where y.a=x.b and x.b = 0x1f;
@@ -1000,34 +1005,34 @@ create unique index t3_d3 on t3_hash(d3)
commit;
# Use an unique key to lookup root in pushed join:
-explain
+explain extended
select * from t3 x, t3 y where x.d3=31 and y.a3=x.d3 and y.b3=x.b3;
select * from t3 x, t3 y where x.d3=31 and y.a3=x.d3 and y.b3=x.b3;
# No data-found on unique key lookup root
-explain
+explain extended
select * from t3 x, t3 y where x.d3=0 and y.a3=x.d3 and y.b3=x.b3;
select * from t3 x, t3 y where x.d3=0 and y.a3=x.d3 and y.b3=x.b3;
# Use an unique key to lookup joined child tables
-explain
+explain extended
select * from t1 x, t3 y where y.d3=x.b;
--sorted_result
select * from t1 x, t3 y where y.d3=x.b;
# Unique index used both for root lookup and child linkage.
-explain
+explain extended
select * from t3 x, t3 y where x.d3=31 and y.d3=x.b3;
select * from t3 x, t3 y where x.d3=31 and y.d3=x.b3;
# No data-found on unique key lookup child
-explain
+explain extended
select * from t3 x, t3 y where x.d3=31 and y.d3=x.c3;
select * from t3 x, t3 y where x.d3=31 and y.d3=x.c3;
# 'index_merge' between PRIMARY and index t3.d3
# NOTE: currently unhandled
-explain
+explain extended
select * from t3 x, t3 y
where ((x.a3=0x2f and x.b3=0x3f) or x.d3=0x1f)
and (y.a3=x.d3 and y.b3=x.b3);
@@ -1036,7 +1041,7 @@ explain
where ((x.a3=0x2f and x.b3=0x3f) or x.d3=0x1f)
and (y.a3=x.d3 and y.b3=x.b3);
-explain
+explain extended
select * from t3_hash x, t3_hash y
where ((x.a3=0x2f and x.b3=0x3f) or x.d3=0x1f)
and (y.a3=x.d3 and y.b3=x.b3);
@@ -1046,7 +1051,7 @@ explain
and (y.a3=x.d3 and y.b3=x.b3);
# Any ordered index may also be used to scan a 'range'
-explain
+explain extended
select * from t3 x, t3 y where x.d3>=31 and y.d3=x.b3;
--sorted_result
select * from t3 x, t3 y where x.d3>=31 and y.d3=x.b3;
@@ -1081,17 +1086,17 @@ insert into t3_unq values (1001, 0x1f, 0
insert into t3_unq values (1002, 0x2f, 0x3f, 2, 0x2f);
insert into t3_unq values (1003, 0x3f, 0x1f, 3, 0x3f);
-explain
+explain extended
select * from t3 x, t3 y where y.a3=x.d3 and y.b3=x.b3;
--sorted_result
select * from t3 x, t3 y where y.a3=x.d3 and y.b3=x.b3;
-explain
+explain extended
select * from t3_hash x, t3_hash y where y.a3=x.d3 and y.b3=x.b3;
--sorted_result
select * from t3_hash x, t3_hash y where y.a3=x.d3 and y.b3=x.b3;
-explain
+explain extended
select * from t3_unq x, t3_unq y where y.a3=x.d3 and y.b3=x.b3;
--sorted_result
select * from t3_unq x, t3_unq y where y.a3=x.d3 and y.b3=x.b3;
@@ -1107,7 +1112,7 @@ insert into t3 values (0x2f, 0x3f, 2, 0x
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
insert into t3 values (0x4f, 0, NULL, NULL);
-explain
+explain extended
select * from t3 as t1
left outer join t3 as t2 on t2.d3 = t1.d3
left outer join t3 as t3 on t3.a3 = t2.d3;
@@ -1117,7 +1122,7 @@ select * from t3 as t1
left outer join t3 as t3 on t3.a3 = t2.d3;
## Test usage of nullable unique key column in where clause on pushed parent node
-explain
+explain extended
select * from t3 as t1
left outer join t3 as t2 on t2.d3 = t1.a3
left outer join t3 as t3 on t3.a3 = t2.d3
@@ -1128,7 +1133,7 @@ select * from t3 as t1
left outer join t3 as t3 on t3.a3 = t2.d3
where t1.d3 = 47;
-explain
+explain extended
select * from t3 as t1
left outer join t3 as t2 on t2.d3 = t1.a3
left outer join t3 as t3 on t3.a3 = t2.d3
@@ -1139,7 +1144,7 @@ select * from t3 as t1
left outer join t3 as t3 on t3.a3 = t2.d3
where t1.d3 >= 47;
-explain
+explain extended
select * from t3 as t1
left outer join t3 as t2 on t2.d3 = t1.a3
left outer join t3 as t3 on t3.a3 = t2.d3
@@ -1150,7 +1155,7 @@ select * from t3 as t1
left outer join t3 as t3 on t3.a3 = t2.d3
where t1.d3 is NULL;
-explain
+explain extended
select * from t3 as t1
left outer join t3 as t2 on t2.d3 = t1.a3
left outer join t3 as t3 on t3.a3 = t2.d3
@@ -1177,7 +1182,7 @@ insert into t3 values (0x42, 0, 4,
insert into t3 values (0x43, 0, NULL, 0x43);
## Baseline: Not pushed as only one of the columns in unique indexes are REF'ed
-explain
+explain extended
select straight_join *
from t3 as X JOIN t3 as Y on X.b3 = Y.b3;
--sorted_result
@@ -1185,7 +1190,7 @@ select straight_join *
from t3 as X JOIN t3 as Y on X.b3 = Y.b3;
## Extend query above with 'where <const cond>'
-explain
+explain extended
select straight_join *
from t3 as X JOIN t3 as Y on X.b3 = Y.b3
where Y.d3 = 0x2f;
@@ -1194,7 +1199,7 @@ select straight_join *
from t3 as X JOIN t3 as Y on X.b3 = Y.b3
where Y.d3 = 0x2f;
-explain
+explain extended
select straight_join *
from t3 as X JOIN t3 as Y on X.c3 = Y.c3
where Y.d3 = 0x2f;
@@ -1203,7 +1208,7 @@ select straight_join *
from t3 as X JOIN t3 as Y on X.c3 = Y.c3
where Y.d3 = 0x2f;
-explain
+explain extended
select straight_join *
from t3 as X JOIN t3 as Y on X.d3 = Y.d3
where Y.b3 = 0x2f;
@@ -1212,7 +1217,7 @@ select straight_join *
from t3 as X JOIN t3 as Y on X.d3 = Y.d3
where Y.b3 = 0x2f;
-explain
+explain extended
select straight_join *
from t3 as X JOIN t3 as Y on X.d3 = Y.d3
where Y.b3 = 0x20+0x2f;
@@ -1223,7 +1228,7 @@ select straight_join *
## Not pushable as 'not NULL' is actually not a single const value
-explain
+explain extended
select straight_join *
from t3 as X JOIN t3 as Y on X.b3 = Y.b3
where Y.d3 is not NULL;
@@ -1234,7 +1239,7 @@ select straight_join *
## Neither 'is NULL' pushable as uniqueness is not defined for NULL
## ... and NULL's are not present in the unique index
-explain
+explain extended
select straight_join *
from t3 as X JOIN t3 as Y on X.b3 = Y.b3
where Y.d3 is NULL;
@@ -1243,7 +1248,7 @@ select straight_join *
from t3 as X JOIN t3 as Y on X.b3 = Y.b3
where Y.d3 is NULL;
-explain
+explain extended
select straight_join *
from t3 as X JOIN t3 as Y on X.c3 = Y.c3
where Y.b3 = 0;
@@ -1253,7 +1258,7 @@ select straight_join *
where Y.b3 = 0;
## As 'b3' is defined as 'NOT NULL', this query will optimized as 'Impossible WHERE' (No push)
-explain
+explain extended
select straight_join *
from t3 as X JOIN t3 as Y on X.c3 = Y.c3
where Y.b3 is NULL;
@@ -1266,7 +1271,7 @@ select straight_join *
## Last join (JOIN t3 as Y2) refer X1.c3 which will
## be handled as a constant paramValue wrt. scope of the
## second pushed join.
-explain
+explain extended
select straight_join * from
t3 as X1
JOIN t3 as Y1 on X1.b3 = Y1.b3 and X1.d3 = Y1.d3
@@ -1422,7 +1427,7 @@ join t1 as t4 on t4.a = t3.b
## Test subquery execution where 'Full scan on NULL key' strategy requires
## table scan execution in addition to the key lookup which was prepared
## as part of the pushed join NdbQuery
-explain
+explain extended
select *
from t1 where b in
(select x.a from t1 as x join t1 as y on (y.a = x.b))
@@ -1438,7 +1443,7 @@ xor c > 5;
## to 't1.b' should not be pushed as outer referrences are outside
## the scope of our JOIN_TAB's
##############
-explain
+explain extended
select t1.a, (select straight_join X.a from t1 as X join t1 as Y on X.a=Y.b where Y.a = t1.b) from t1;
--sorted_result
select t1.a, (select straight_join X.a from t1 as X join t1 as Y on X.a=Y.b where Y.a = t1.b) from t1;
@@ -1452,7 +1457,7 @@ create table t2 (a int primary key, b in
insert into t1 values(1,1), (2,2), (3,3), (4,4);
insert into t2 values(1,1), (2,2), (3,3), (4,4);
-explain
+explain extended
select * from t1, t2, t1 as t3
where t2.a = t1.b
and t3.a = t2.b;
@@ -1478,7 +1483,7 @@ insert into t2 values (3,3);
insert into t2 values (4,1);
set ndb_join_pushdown=true;
-explain
+explain extended
select t1.a, t1.b, t2.a, t2.b
from t1, t2
where t2.a = t1.b;
@@ -1487,7 +1492,7 @@ select t1.a, t1.b, t2.a, t2.b
from t1, t2
where t2.a = t1.b;
-explain
+explain extended
select t1.a, t1.b, t2.a, t2.b
from t1, t2
where t2.a = t1.b
@@ -1498,7 +1503,7 @@ from t1, t2
where t2.a = t1.b
and t1.a = 2;
-explain
+explain extended
select t1.a, t1.b, t2.a, t2.b
from t1, t2
where t1.a = t2.b;
@@ -1507,7 +1512,7 @@ select t1.a, t1.b, t2.a, t2.b
from t1, t2
where t2.a = t1.b;
-explain
+explain extended
select t1.a, t1.b, t2.a, t2.b
from t1, t2
where t1.a = t2.b
@@ -1521,7 +1526,7 @@ where t1.a = t2.b
#
# result sets contain blob
# i.e no push
-explain
+explain extended
select *
from t1, t2
where t2.a = t1.b;
@@ -1530,7 +1535,7 @@ select *
from t1, t2
where t2.a = t1.b;
-explain
+explain extended
select *
from t1, t2
where t2.a = t1.b
@@ -1541,7 +1546,7 @@ from t1, t2
where t2.a = t1.b
and t1.a = 2;
-explain
+explain extended
select *
from t1, t2
where t1.a = t2.b;
@@ -1550,7 +1555,7 @@ select *
from t1, t2
where t2.a = t1.b;
-explain
+explain extended
select *
from t1, t2
where t1.a = t2.b
@@ -1572,7 +1577,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3="63";
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3="63";
drop table t3;
@@ -1582,7 +1587,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
drop table t3;
@@ -1592,7 +1597,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
drop table t3;
@@ -1602,7 +1607,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
drop table t3;
@@ -1612,7 +1617,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
drop table t3;
@@ -1622,7 +1627,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
drop table t3;
@@ -1632,7 +1637,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
drop table t3;
@@ -1642,7 +1647,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
drop table t3;
@@ -1652,7 +1657,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
drop table t3;
@@ -1662,7 +1667,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=(60+3);
drop table t3;
@@ -1672,7 +1677,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 0, 1, 0x1f);
insert into t3 values (0x2f, 1, 2, 0x2f);
insert into t3 values (0x3f, 0, 3, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=1;
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=1;
drop table t3;
@@ -1682,7 +1687,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 2.71, 1, 0x1f);
insert into t3 values (0x2f, 3.00, 2, 0x2f);
insert into t3 values (0x3f, 0.50, 3, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=3.0;
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=3.0;
drop table t3;
@@ -1692,7 +1697,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 2.71, 1, 0x1f);
insert into t3 values (0x2f, 3.00, 2, 0x2f);
insert into t3 values (0x3f, 0.50, 3, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=3.0;
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=3.0;
drop table t3;
@@ -1702,7 +1707,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 2.71, 1, 0x1f);
insert into t3 values (0x2f, 3.14, 2, 0x2f);
insert into t3 values (0x3f, 0.50, 3, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=3.14;
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=3.14;
drop table t3;
@@ -1712,7 +1717,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 2.71, 1, 0x1f);
insert into t3 values (0x2f, 3.14, 2, 0x2f);
insert into t3 values (0x3f, 0.50, 3, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=3.14;
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=3.14;
drop table t3;
@@ -1722,7 +1727,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=63;
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=63;
drop table t3;
@@ -1732,7 +1737,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 2.71, 1, 0x1f);
insert into t3 values (0x2f, 3.14, 2, 0x2f);
insert into t3 values (0x3f, 0.50, 3, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=3.14;
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3=3.14;
drop table t3;
@@ -1742,7 +1747,7 @@ drop table t1, t2;
insert into t3 values (0x1f, '1905-05-17', 1, 0x1f);
insert into t3 values (0x2f, '2000-02-28', 2, 0x2f);
insert into t3 values (0x3f, '2000-02-29', 3, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='2000-02-28';
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='2000-02-28';
drop table t3;
@@ -1752,7 +1757,7 @@ drop table t1, t2;
insert into t3 values (0x1f, '1905-05-17 12:30:00', 1, 0x1f);
insert into t3 values (0x2f, '2000-02-28 23:59:00', 2, 0x2f);
insert into t3 values (0x3f, '2000-02-29 12:59:59', 2, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='2000-02-28 23:59';
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='2000-02-28 23:59';
drop table t3;
@@ -1762,7 +1767,7 @@ drop table t1, t2;
insert into t3 values (0x1f, '12:30:00', 1, 0x1f);
insert into t3 values (0x2f, '23:59:00', 2, 0x2f);
insert into t3 values (0x3f, '12:59:59', 2, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='23:59';
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='23:59';
drop table t3;
@@ -1772,7 +1777,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 'Ole', 1, 0x1f);
insert into t3 values (0x2f, 'Dole', 2, 0x2f);
insert into t3 values (0x3f, 'Doffen', 2, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='Dole';
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='Dole';
drop table t3;
@@ -1782,7 +1787,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 'Ole', 1, 0x1f);
insert into t3 values (0x2f, 'Dole', 2, 0x2f);
insert into t3 values (0x3f, 'Doffen', 2, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='Dole';
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='Dole';
drop table t3;
@@ -1792,7 +1797,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 'Ole', 1, 0x1f);
insert into t3 values (0x2f, 'Dole', 2, 0x2f);
insert into t3 values (0x3f, 'Doffen', 2, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='Dole';
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='Dole';
drop table t3;
@@ -1802,7 +1807,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 'Ole', 1, 0x1f);
insert into t3 values (0x2f, 'Dole', 2, 0x2f);
insert into t3 values (0x3f, 'Doffen', 2, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='Dole';
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='Dole';
drop table t3;
@@ -1812,7 +1817,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 'Ole', 1, 0x1f);
insert into t3 values (0x2f, 'Dole', 2, 0x2f);
insert into t3 values (0x3f, 'Doffen', 2, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='Dole';
select * from t3 x, t3 y where x.a3=0x2f and y.a3=x.d3 and y.b3='Dole';
drop table t3;
@@ -1826,7 +1831,7 @@ drop table t1, t2;
insert into t3 values (0x1f, 0x2f, 1, 0x1f);
insert into t3 values (0x2f, 0x3f, 2, 0x2f);
insert into t3 values (0x3f, 0x1f, 3, 0x3f);
- explain
+ explain extended
select * from t3 x, t3 y where y.a3=x.b3 and y.b3="63";
select * from t3 x, t3 y where y.a3=x.b3 and y.b3="63";
drop table t3;
@@ -1843,12 +1848,12 @@ insert into t3 values ('Dole', 0x2f, 2,
insert into t3 values ('Doffen', 0x3f, 2, 0x3f);
# Varchar is lookup key
-explain
+explain extended
select * from t3 x, t3 y where x.a3='Dole' and x.b3=0x2f and y.a3=x.a3 and y.b3=x.d3;
select * from t3 x, t3 y where x.a3='Dole' and x.b3=0x2f and y.a3=x.a3 and y.b3=x.d3;
# Varchar as hi/low bound
-explain
+explain extended
select * from t3 x, t3 y where x.a3='Dole' and y.a3=x.a3 and y.b3=x.d3;
select * from t3 x, t3 y where x.a3='Dole' and y.a3=x.a3 and y.b3=x.d3;
drop table t3;
@@ -1865,7 +1870,7 @@ insert into t1 values (1,1), (2,1), (3,1
## row caching in join_read_key() where we eliminate redundant lookups
## where 'next row == current row'. In order to work for linked operations,
## the value and status for all linked tables should be kept unaltered.
-explain
+explain extended
select *
from t1
straight_join t1 as t2 on t2.k = t1.b+0
@@ -1880,7 +1885,7 @@ from t1
## Similar example as above, except that access to 't2' is made
## a const table access
-explain
+explain extended
select *
from t1
straight_join t1 as t2 on t2.k = t1.b+0
@@ -1973,27 +1978,27 @@ insert into T2 values (11, 12);
insert into T2 values (12, 13);
# Disk data in projection of first op.
-explain select * from T1, T2 where T1.c = T2.a;
+explain extended select * from T1, T2 where T1.c = T2.a;
--sorted_result
select * from T1, T2 where T1.c = T2.a;
-explain select * from T1, T2 where T1.a=11 and T1.c = T2.a;
+explain extended select * from T1, T2 where T1.a=11 and T1.c = T2.a;
select * from T1, T2 where T1.a=11 and T1.c = T2.a;
# Disk data in projection of second op.
-explain select * from T2, T1 where T2.b = T1.a;
+explain extended select * from T2, T1 where T2.b = T1.a;
--sorted_result
select * from T2, T1 where T2.b = T1.a;
-explain select * from T2, T1 where T2.a=11 and T2.b = T1.a;
+explain extended select * from T2, T1 where T2.a=11 and T2.b = T1.a;
select * from T2, T1 where T2.a=11 and T2.b = T1.a;
# Disk data in predicate but not in projection
-explain select T1.a, T1.c, T2.a, T2.b from T1, T2 where T1.b = T2.a;
+explain extended select T1.a, T1.c, T2.a, T2.b from T1, T2 where T1.b = T2.a;
--sorted_result
select T1.a, T1.c, T2.a, T2.b from T1, T2 where T1.b = T2.a;
-explain select T1.a, T1.c, T2.a, T2.b from T1, T2 where T1.a=11 and T1.b = T2.a;
+explain extended select T1.a, T1.c, T2.a, T2.b from T1, T2 where T1.a=11 and T1.b = T2.a;
select T1.a, T1.c, T2.a, T2.b from T1, T2 where T1.a=11 and T1.b = T2.a;
drop table T1;
@@ -2079,7 +2084,7 @@ let $spj_lookups = query_get_value(selec
# Root scan should give only one tuple if scan filter is pushed.
# Therefore only one lookup on 'y'.
-explain select * from T1 x, T1 y where x.b=y.a and x.c=4;
+explain extended select * from T1 x, T1 y where x.b=y.a and x.c=4;
select * from T1 x, T1 y where x.b=y.a and x.c=4;
@@ -2089,7 +2094,7 @@ select * from T1 x, T1 y where x.b=y.a a
# Lookup on y should only give one result tuple if filter is pushed.
# This should give 3 lookups on 'y' and 1 on 'z', 4 in all.
-explain select * from T1 x, T1 y, T1 z where x.b=y.a and y.c=4 and y.b=z.a;
+explain extended select * from T1 x, T1 y, T1 z where x.b=y.a and y.c=4 and y.b=z.a;
select * from T1 x, T1 y, T1 z where x.b=y.a and y.c=4 and y.b=z.a;
@@ -2186,7 +2191,7 @@ let $old_pruned_scan_count = query_get_v
create index i1 on T1(c,a);
-explain select count(*) from T1 t1, T1 t2 where t1.c = 12 and t1.a = 11 and t2.a = t1.d and t2.b = t1.d;
+explain extended select count(*) from T1 t1, T1 t2 where t1.c = 12 and t1.a = 11 and t2.a = t1.d and t2.b = t1.d;
select count(*) from T1 t1, T1 t2 where t1.c = 12 and t1.a = 11 and t2.a = t1.d and t2.b = t1.d;
@@ -2203,7 +2208,7 @@ let $old_pruned_scan_count = query_get_v
create index i2 on T1(a,b);
-explain select count(*) from T1 t1, T1 t2 where t1.a = 11 and t1.b<13 and t2.a = t1.c and t2.b = t1.c;
+explain extended select count(*) from T1 t1, T1 t2 where t1.a = 11 and t1.b<13 and t2.a = t1.c and t2.b = t1.c;
select count(*) from T1 t1, T1 t2 where t1.a = 11 and t1.b<13 and t2.a = t1.c and t2.b = t1.c;
--disable_query_log
@@ -2213,7 +2218,7 @@ let $old_pruned_scan_count = query_get_v
--enable_query_log
# Should give pruned scan. Upper and lower bounds for t1.a are the sane.
-explain select count(*) from T1 t1, T1 t2 where t1.a >= 12 and t1.a<=12 and t2.a = t1.c and t2.b = t1.c;
+explain extended select count(*) from T1 t1, T1 t2 where t1.a >= 12 and t1.a<=12 and t2.a = t1.c and t2.b = t1.c;
select count(*) from T1 t1, T1 t2 where t1.a >= 12 and t1.a<=12 and t2.a = t1.c and t2.b = t1.c;
--disable_query_log
@@ -2223,7 +2228,7 @@ let $old_pruned_scan_count = query_get_v
--enable_query_log
# Should not give pruned scan. Upper and lower bounds for t1.a are different.
-explain select count(*) from T1 t1, T1 t2 where t1.a >= 11 and t1.a<=12 and t2.a = t1.c and t2.b = t1.c;
+explain extended select count(*) from T1 t1, T1 t2 where t1.a >= 11 and t1.a<=12 and t2.a = t1.c and t2.b = t1.c;
select count(*) from T1 t1, T1 t2 where t1.a >= 11 and t1.a<=12 and t2.a = t1.c and t2.b = t1.c;
--disable_query_log
@@ -2235,7 +2240,7 @@ let $old_pruned_scan_count = query_get_v
# Should not give pruned scan. There will be two sets of bounds that have
# different distribution keys (t1.a=10 and t1.a=12).
-explain select count(*) from T1 t1, T1 t2 where (t1.a = 10 or t1.a=12) and t1.b<13 and t2.a = t1.c and t2.b = t1.c;
+explain extended select count(*) from T1 t1, T1 t2 where (t1.a = 10 or t1.a=12) and t1.b<13 and t2.a = t1.c and t2.b = t1.c;
select count(*) from T1 t1, T1 t2 where (t1.a = 10 or t1.a=12) and t1.b<13 and t2.a = t1.c and t2.b = t1.c;
--disable_query_log
@@ -2247,7 +2252,7 @@ let $old_pruned_scan_count = query_get_v
# Should give pruned scan. There will be two sets of bounds, but they have the
# same distribution key.
-explain select count(*) from T1 t1, T1 t2 where t1.a = 10 and (t1.b<11 or t1.b>11) and t2.a = t1.c and t2.b = t1.c;
+explain extended select count(*) from T1 t1, T1 t2 where t1.a = 10 and (t1.b<11 or t1.b>11) and t2.a = t1.c and t2.b = t1.c;
select count(*) from T1 t1, T1 t2 where t1.a = 10 and (t1.b<11 or t1.b>11) and t2.a = t1.c and t2.b = t1.c;
--disable_query_log
@@ -2281,7 +2286,7 @@ create index i2_1 on T2(d, a, b, e);
# Should give pruned scan. The index prefix containing the distribution key
# has a single possible value.
-explain select count(*) from T2 x, T2 y where x.d=1 and x.a=1 and x.b=2 and y.a=x.d and y.b=x.e and y.c=3;
+explain extended select count(*) from T2 x, T2 y where x.d=1 and x.a=1 and x.b=2 and y.a=x.d and y.b=x.e and y.c=3;
select count(*) from T2 x, T2 y where x.d=1 and x.a=1 and x.b=2 and y.a=x.d and y.b=x.e and y.c=3;
@@ -2298,7 +2303,7 @@ create index i2_3 on T2(a, d, b, e);
# Should give pruned scan. The index prefix containing the distribution key
# has a single possible value.
-explain select count(*) from T2 x, T2 y where x.d=1 and x.a=1 and x.b=2 and y.a=x.d and y.b=x.e and y.c=3;
+explain extended select count(*) from T2 x, T2 y where x.d=1 and x.a=1 and x.b=2 and y.a=x.d and y.b=x.e and y.c=3;
select count(*) from T2 x, T2 y where x.d=1 and x.a=1 and x.b=2 and y.a=x.d and y.b=x.e and y.c=3;
@@ -2313,7 +2318,7 @@ create table t1 (a binary(10) primary ke
insert into t1 values ('\0123456789', '1234567890');
insert into t1 values ('1234567890', '\0123456789');
-explain
+explain extended
select count(*)
from t1 join t1 as t2 on t2.a = t1.b
where t1.a = '\0123456789';
@@ -2338,7 +2343,7 @@ set ndb_join_pushdown = false;
# Join should be optimized as 'Impossible On condition'
# ... *not* 'Impossible WHERE'
-explain
+explain extended
select * from t1 as x right join t1 as y
on x.pk = y.pk
and x.pk = y.a
@@ -2353,7 +2358,7 @@ where y.pk = 2;
set ndb_join_pushdown = true;
-explain
+explain extended
select * from t1 as x right join t1 as y
on x.pk = y.pk
and x.pk = y.a
@@ -2380,7 +2385,7 @@ insert into t1 values (0,1,10,20);
insert into t1 values (1,2,20,30);
insert into t1 values (2,3,30,40);
-explain select * from t1 as x join t1 as y join t1 as z on x.u=y.pk and y.a=z.b;
+explain extended select * from t1 as x join t1 as y join t1 as z on x.u=y.pk and y.a=z.b;
--sorted_result
select * from t1 as x join t1 as y join t1 as z on x.u=y.pk and y.a=z.b;
@@ -2408,7 +2413,7 @@ insert into t1 values (0,-1), (1,-1), (2
(125,-1), (126,-1), (127,-1), (128,-1), (129,-1), (130,-1), (131,-1),
(132,-1), (133,-1), (134,-1), (135,-1), (136,-1), (137,-1), (138,-1), (139,-1);
-explain select * from t1 as x join t1 as y on x.u=y.pk order by(x.pk);
+explain extended select * from t1 as x join t1 as y on x.u=y.pk order by(x.pk);
select * from t1 as x join t1 as y on x.u=y.pk order by(x.pk);
drop table t1;
@@ -2433,13 +2438,13 @@ insert into t1 values (10,10,10,10);
insert into t1 values (11,11,10,10);
-explain select count(*) from t1 as x1 join t1 as x2 join t1 as x3
+explain extended select count(*) from t1 as x1 join t1 as x2 join t1 as x3
on x1.a=x2.u and x2.a = x3.b;
select count(*) from t1 as x1 join t1 as x2 join t1 as x3
on x1.a=x2.u and x2.a = x3.b;
-explain select count(*) from t1 as x1, t1 as x2, t1 as x3
+explain extended select count(*) from t1 as x1, t1 as x2, t1 as x3
where x1.u=x2.pk and x1.a=x3.b;
select count(*) from t1 as x1, t1 as x2, t1 as x3
@@ -2450,14 +2455,14 @@ where x1.u=x2.pk and x1.a=x3.b;
insert into t1 values (12,12,20,10);
-explain select count(*) from t1 as x1 left join t1 as x2 on x1.a=x2.b;
+explain extended select count(*) from t1 as x1 left join t1 as x2 on x1.a=x2.b;
select count(*) from t1 as x1 left join t1 as x2 on x1.a=x2.b;
set ndb_join_pushdown=off;
select count(*) from t1 as x1 left join t1 as x2 on x1.a=x2.b;
set ndb_join_pushdown=on;
# Test left join with mix of scan and lookup.
-explain select count(*) from t1 as x1
+explain extended select count(*) from t1 as x1
left join t1 as x2 on x1.u=x2.pk
left join t1 as x3 on x2.a=x3.b;
@@ -2470,7 +2475,7 @@ left join t1 as x2 on x1.u=x2.pk
left join t1 as x3 on x2.a=x3.b;
set ndb_join_pushdown=on;
-explain select count(*) from t1 as x1
+explain extended select count(*) from t1 as x1
left join t1 as x2 on x1.u=x2.pk
left join t1 as x3 on x2.a=x3.b
left join t1 as x4 on x3.u=x4.pk
@@ -2496,7 +2501,7 @@ set ndb_join_pushdown=on;
# This in turn caused a pushed 'lookup-scan' query to be produced - which we don't support
# Should not be pushed (lookup-scan query)
-explain select count(*) from t1 as x1
+explain extended select count(*) from t1 as x1
join t1 as x2 on x1.a=x2.b
where x1.pk = 1 or x1.u=1;
@@ -2518,7 +2523,7 @@ select count(*) from t1 as x1
# and its child(s).
set ndb_join_pushdown=on;
-explain
+explain extended
select straight_join * from t1 as table1
left join
(t1 as table2 join t1 as table3 on table2.pk = table3.b)
@@ -2535,20 +2540,20 @@ select straight_join * from t1 as table1
# may cause the parent row to be returned multiple times:
# Push scan-scan when inner joined
-explain select straight_join * from t1 as x1
+explain extended select straight_join * from t1 as x1
inner join t1 as x2 on x2.b = x1.a;
# Outer joined scans are not pushed.
-explain select straight_join * from t1 as x1
+explain extended select straight_join * from t1 as x1
left join t1 as x2 on x2.b = x1.a;
-explain select straight_join * from t1 as x1
+explain extended select straight_join * from t1 as x1
right join t1 as x2 on x2.b = x1.a;
# If there is a lookup operation(s) inbetween the scans
# pushing is disabled if any of these are outer joined
# inner joined lookups, push allowed
-explain select straight_join * from
+explain extended select straight_join * from
t1 as x1 inner join
(t1 as x2 inner join t1 as x3 on x3.b = x2.a)
on x2.pk = x1.a;
@@ -2556,7 +2561,7 @@ explain select straight_join * from
# Even if x3 is inner joined with x2 (lookup)
# push is dissabled as x2 is outer joined with embedding scan operation
# which makes join relation between the scans on x1 & x3 an 'indirect' outer join
-explain select straight_join * from
+explain extended select straight_join * from
t1 as x1 left join
(t1 as x2 inner join t1 as x3 on x3.b = x2.a)
on x2.pk = x1.a;
@@ -2565,7 +2570,7 @@ explain select straight_join * from
# Test bushy-scans:
# These should be serialized through an artificial dependency between the bushy scan childs.
#
-explain select straight_join count(*) from t1 as x1
+explain extended select straight_join count(*) from t1 as x1
join t1 as x2 on x2.b = x1.a
join t1 as x3 on x3.b = x1.b;
set ndb_join_pushdown=off;
@@ -2581,7 +2586,7 @@ select straight_join count(*) from t1 as
# If we have an outer join, we can't create an artificial dep. 'through' the outer join.
# In this case the child scan can't be part of the pushed query.
#
-explain select straight_join count(*) from t1 as x1
+explain extended select straight_join count(*) from t1 as x1
left join t1 as x2 on x2.b = x1.a
join t1 as x3 on x3.b = x1.b;
@@ -2597,7 +2602,7 @@ select straight_join count(*) from t1 as
############
# However, When the scanchild itself is an outer join, we *can* push that scan operation
#
-explain select straight_join count(*) from t1 as x1
+explain extended select straight_join count(*) from t1 as x1
join t1 as x2 on x2.b = x1.a
left join t1 as x3 on x3.b = x1.b;
@@ -2619,7 +2624,7 @@ select straight_join count(*) from t1 as
# don't believe this to be an efficient way of executing the pushed query, and would
# instead break these queries up into several smaller queries)
#
-explain
+explain extended
select straight_join count(*) from t1 as x1
join t1 as x2 on x2.b = x1.a
join t1 as x3 on x3.pk = x1.a join t1 as x4 on x4.b = x3.a;
@@ -2640,7 +2645,7 @@ select straight_join count(*) from t1 as
# Repeatable child rangescan with same parent should be allowed to be in
# 'm_iterState != Iter_finished' if the child row didn't exist (outer join):
-explain select straight_join count(*) from t1 as x1
+explain extended select straight_join count(*) from t1 as x1
left join t1 as x3 on x3.b = x1.a
join t1 as x2 on x2.pk = x1.a;
select straight_join count(*) from t1 as x1
@@ -2671,7 +2676,7 @@ update t1 set b=b-10;
update t1 set u=u+100;
set ndb_join_pushdown=on;
-explain select count(*) from
+explain extended select count(*) from
(t1 as x join t1 as y on y.b = x.a)
left outer join t1 as z on z.u = x.a;
select count(*) from
@@ -2687,7 +2692,7 @@ drop index ix2 on t1;
create unique index ix2 on t1(a,u);
set ndb_join_pushdown=on;
-explain
+explain extended
select straight_join * from
t1 as table1 join
(t1 as table2 join t1 as table3 on table3.a = table2.a)
@@ -2734,7 +2739,7 @@ let $const_pruned_range = query_get_valu
set ndb_join_pushdown=on;
-explain
+explain extended
select straight_join * from t1 x, t1 y where y.a=x.d and y.b=x.e;
--sorted_result
@@ -2781,7 +2786,7 @@ alter table t1 drop primary key, add pri
alter table t1 partition by key (b);
create index ix1 on t1(b,d,a);
-explain
+explain extended
select straight_join * from t1 x, t1 y where y.a=x.d and y.b=x.e;
###########
@@ -2822,7 +2827,7 @@ insert into t1 values (9,10,10);
# Results would be sorted wrongly if pushed.
-explain select x1.pk,x1.a,x1.b from t1 as x1
+explain extended select x1.pk,x1.a,x1.b from t1 as x1
join t1 as x2 on x1.a=x2.b
join t1 as x3 on x2.a=x3.b
order by x1.pk limit 70;
@@ -2833,7 +2838,7 @@ select x1.pk,x1.a,x1.b from t1 as x1
# This query should not be pushed, since mysqld requires sorted
# results for the root scan.
-explain select * from t1 as x1, t1 as x2 where x1.a=x2.b and x1.b = 3;
+explain extended select * from t1 as x1, t1 as x2 where x1.a=x2.b and x1.b = 3;
select * from t1 as x1, t1 as x2 where x1.a=x2.b and x1.b = 3;
drop table t1;
@@ -2849,7 +2854,7 @@ insert into t values
(4,3), (6,3),
(7,4), (8,4);
-explain
+explain extended
SELECT DISTINCT STRAIGHT_JOIN table1.pk FROM
t AS table1 JOIN
(t AS table2 JOIN
@@ -2876,7 +2881,7 @@ drop table t;
create table t (b int, a int, primary key (a,b)) engine=ndb;
insert into t values(0,0);
-explain
+explain extended
select * from t as t1 join t as t2 on t2.a=t1.a where t1.a < 8 or t1.a >= 8;
select * from t as t1 join t as t2 on t2.a=t1.a where t1.a < 8 or t1.a >= 8;
@@ -2896,7 +2901,7 @@ CREATE TABLE tc(
insert into tc values ('aa','bb', 'x'), ('bb','cc', 'x'), ('cc', 'dd', 'x');
-explain select * from tc as x1
+explain extended select * from tc as x1
right outer join tc as x2 on x1.b=x2.a
left outer join tc as x3 on x2.b = x3.b and x1.c=x3.c;
@@ -2909,9 +2914,9 @@ select * from tc as x1
# Test that 'select ... for update' is not pushed, since this requires locking.
####
-explain select * from tc as x1, tc as x2 where x1.b=x2.a for update;
+explain extended select * from tc as x1, tc as x2 where x1.b=x2.a for update;
-explain select * from tc as x1, tc as x2 where x1.b=x2.a;
+explain extended select * from tc as x1, tc as x2 where x1.b=x2.a;
drop table tc;
@@ -2927,7 +2932,7 @@ create table t1 (
) engine ndb partition by key (a);
insert into t1 values ('aaa', 1, 'aaa', 1);
-explain
+explain extended
select * from t1 as q1, t1 as q2 where q1.a = 'aaa' and q1.c=q2.a;
select * from t1 as q1, t1 as q2 where q1.a = 'aaa' and q1.c=q2.a;
drop table t1;
=== modified file 'sql/abstract_query_plan.cc'
--- a/sql/abstract_query_plan.cc 2010-10-21 08:31:51 +0000
+++ b/sql/abstract_query_plan.cc 2010-11-08 15:13:37 +0000
@@ -280,10 +280,19 @@ namespace AQP
* There are some JOIN arguments we don't fully understand or has
* not yet invested time into exploring pushability of:
*/
- if (join->procedure ||
- (join->group_list && !join->tmp_table_param.quick_group))
+ if (join->procedure)
{
m_access_type= AT_OTHER;
+ m_other_access_reason =
+ "'PROCEDURE'-clause post processing cannot be pushed.";
+ DBUG_VOID_RETURN;
+ }
+
+ if (join->group_list && !join->tmp_table_param.quick_group)
+ {
+ m_access_type= AT_OTHER;
+ m_other_access_reason =
+ "GROUP BY cannot be done using index on grouped columns.";
DBUG_VOID_RETURN;
}
@@ -362,7 +371,7 @@ namespace AQP
DBUG_PRINT("info",
("Operation %d has 'use_quick == 2' -> not pushable",
m_tab_no));
- m_access_type= AT_OTHER;
+ m_access_type= AT_UNDECIDED;
m_index_no= -1;
}
else
@@ -434,6 +443,7 @@ namespace AQP
m_tab_no, join_tab->type));
m_access_type= AT_OTHER;
m_index_no= -1;
+ m_other_access_reason = "This table access method can not be pushed.";
break;
}
DBUG_VOID_RETURN;
@@ -445,6 +455,7 @@ namespace AQP
:m_join_plan(NULL),
m_tab_no(0),
m_access_type(AT_VOID),
+ m_other_access_reason(NULL),
m_index_no(-1)
{}
=== modified file 'sql/abstract_query_plan.h'
--- a/sql/abstract_query_plan.h 2010-10-21 08:31:51 +0000
+++ b/sql/abstract_query_plan.h 2010-11-08 15:13:37 +0000
@@ -160,9 +160,11 @@ namespace AQP
AT_MULTI_MIXED,
/** Scan a table. (No index is assumed to be used.) */
AT_TABLE_SCAN,
+ /** Access method will not be chosen before the execution phase.*/
+ AT_UNDECIDED,
/**
- The access method has not yet been decided, or it has properties that
- otherwise prevents it from being pushed to a storage engine.
+ The access method has properties that prevents it from being pushed to a
+ storage engine.
*/
AT_OTHER
};
@@ -189,6 +191,8 @@ namespace AQP
enum_access_type get_access_type() const;
+ const char* get_other_access_reason() const;
+
enum_join_type get_join_type(const Table_access* parent) const;
uint get_no_of_key_fields() const;
@@ -216,6 +220,11 @@ namespace AQP
/** The type of this operation.*/
mutable enum_access_type m_access_type;
+ /**
+ The reason for getting m_access_type==AT_OTHER. Used for explain extended.
+ */
+ mutable const char* m_other_access_reason;
+
/** The index to use for this operation (if applicable )*/
mutable int m_index_no;
@@ -258,6 +267,19 @@ namespace AQP
return m_access_type;
}
+ /**
+ Get a description of the reason for getting access_type==AT_OTHER. To be
+ used for informational messages.
+ @return A string that should be assumed to have the same life time as the
+ Table_access object.
+ */
+ inline const char* Table_access::get_other_access_reason() const
+ {
+ if (m_access_type == AT_VOID)
+ compute_type_and_index();
+ return m_other_access_reason;
+ }
+
/**
@return The number of the index to use for this access operation (
or -1 for non-index operations).
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc 2010-11-02 11:36:28 +0000
+++ b/sql/ha_ndbcluster.cc 2010-11-08 15:13:37 +0000
@@ -309,7 +309,7 @@ static int ndb_to_mysql_error(const NdbE
#define EXPLAIN_NO_PUSH(msgfmt, ...) \
{ \
- if (unlikely((current_thd->lex->describe & DESCRIBE_EXTENDED))) \
+ if (unlikely(current_thd->lex->describe & DESCRIBE_EXTENDED)) \
{ \
explain_no_push ((msgfmt), __VA_ARGS__); \
} \
@@ -834,15 +834,42 @@ ndb_pushed_builder_ctx::init_pushability
{
m_tables[i].m_maybe_pushable= 0;
- const TABLE* const table= m_plan.get_table_access(i)->get_table();
- if (table->file->ht != ndbcluster_hton)
+ const AQP::Table_access* const table_access = m_plan.get_table_access(i);
+ if (table_access->get_table()->file->ht != ndbcluster_hton)
{
m_tables[i].m_maybe_pushable= 0;
- EXPLAIN_NO_PUSH("Table '%s' not in Cluster engine, not pushable", table->alias);
+ EXPLAIN_NO_PUSH("Table '%s' not in ndb engine, not pushable",
+ table_access->get_table()->alias);
continue;
}
- m_tables[i].m_maybe_pushable= static_cast<ha_ndbcluster*>(table->file)->get_pushability();
+ switch (table_access->get_access_type())
+ {
+ case AQP::AT_VOID:
+ DBUG_ASSERT(false);
+ break;
+
+ case AQP::AT_OTHER:
+ EXPLAIN_NO_PUSH("Table '%s' is not pushable: %s",
+ table_access->get_table()->alias,
+ table_access->get_other_access_reason());
+ m_tables[i].m_maybe_pushable= 0;
+ break;
+
+ case AQP::AT_UNDECIDED:
+ EXPLAIN_NO_PUSH("Access type for table '%s' will not be chosen before"
+ " execution time and '%s' is therefore not pushable.",
+ table_access->get_table()->alias,
+ table_access->get_table()->alias);
+ m_tables[i].m_maybe_pushable= 0;
+ break;
+
+ default:
+ m_tables[i].m_maybe_pushable=
+ static_cast<ha_ndbcluster*>(table_access->get_table()->file)
+ ->get_pushability();
+ break;
+ }
}
m_tables[0].m_maybe_pushable &= ~PUSHABLE_AS_CHILD;
@@ -864,13 +891,6 @@ ndb_pushed_builder_ctx::is_pushable_as_p
const AQP::enum_access_type access_type= table->get_access_type();
DBUG_ASSERT(access_type != AQP::AT_VOID);
- if (access_type == AQP::AT_OTHER)
- {
- EXPLAIN_NO_PUSH("Table '%s' is not pushable, "
- "unknown access 'type'", table->get_table()->alias);
- m_tables[table_no].m_maybe_pushable &= ~PUSHABLE_AS_PARENT;
- DBUG_RETURN(false);
- }
if (access_type == AQP::AT_MULTI_UNIQUE_KEY)
{
EXPLAIN_NO_PUSH("Table '%s' is not pushable, "
@@ -926,7 +946,7 @@ ndb_pushed_builder_ctx::is_pushable_as_c
if (!(is_lookup_operation(access_type) || access_type==AQP::AT_ORDERED_INDEX_SCAN))
{
- EXPLAIN_NO_PUSH("Can't push table '%s' as child, 'type' must be a REF access",
+ EXPLAIN_NO_PUSH("Can't push table '%s' as child, 'type' must be a 'ref' access",
table->get_table()->alias);
m_tables[tab_no].m_maybe_pushable &= ~PUSHABLE_AS_CHILD;
DBUG_RETURN(false);
@@ -945,7 +965,7 @@ ndb_pushed_builder_ctx::is_pushable_as_c
if (table->get_no_of_key_fields() > ndb_pushed_join::MAX_LINKED_KEYS)
{
EXPLAIN_NO_PUSH("Can't push table '%s' as child, "
- "to many REF'ed parent fields",
+ "to many ref'ed parent fields",
table->get_table()->alias);
m_tables[tab_no].m_maybe_pushable &= ~PUSHABLE_AS_CHILD; // Permanently dissable
DBUG_RETURN(false);
@@ -979,7 +999,7 @@ ndb_pushed_builder_ctx::is_pushable_as_c
if (key_part_no==0)
{
EXPLAIN_NO_PUSH("Can't push table '%s' as child, "
- "column '%s' does neither REF a column nor a constant",
+ "column '%s' does neither 'ref' a column nor a constant",
table->get_table()->alias,
table->get_key_part_info(key_part_no)->field->field_name);
m_tables[tab_no].m_maybe_pushable &= ~PUSHABLE_AS_CHILD; // Permanently disable as child
@@ -1005,7 +1025,8 @@ ndb_pushed_builder_ctx::is_pushable_as_c
if (key_part_no==0)
{
EXPLAIN_NO_PUSH("Can't push table '%s' as child, "
- "column '%s' does not have same datatype as REF'ed column '%s.%s'",
+ "column '%s' does not have same datatype as ref'ed "
+ "column '%s.%s'",
table->get_table()->alias,
table->get_key_part_info(key_part_no)->field->field_name,
key_item_field->field->table->alias,
@@ -1119,7 +1140,7 @@ ndb_pushed_builder_ctx::is_pushable_as_c
else
{
EXPLAIN_NO_PUSH("Can't push table '%s' as child of '%s', "
- "Item_field '%s.%s' is outside scope of pushable join",
+ "column '%s.%s' is outside scope of pushable join",
table->get_table()->alias, join_root()->get_table()->alias,
get_referred_table_access_name(key_item_field),
get_referred_field_name(key_item_field));
Attachment: [text/bzr-bundle] bzr/jan.wedvik@sun.com-20101108151337-1v3odhje1gduqzlp.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-7.0-spj-scan-vs-scan branch(jan.wedvik:3345) | Jan Wedvik | 8 Nov |