summaryrefslogtreecommitdiff
path: root/mysql-test/r/subselect3.result
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2010-10-18 13:33:05 -0700
committerIgor Babaev <igor@askmonty.org>2010-10-18 13:33:05 -0700
commit25f5debdc71105820aceaac25799eb3fc09479cd (patch)
tree8832320275a120a662f4e553941a1bb86e83b667 /mysql-test/r/subselect3.result
parent79087c9e072ea2c1af3f1372d5c37729545f618c (diff)
downloadmariadb-git-25f5debdc71105820aceaac25799eb3fc09479cd.tar.gz
MWL#128: Added into EXPLAIN output info about types of the used join buffers and
about the employed join algorithms. Refactored constructors of the JOIN_CACHE* classes.
Diffstat (limited to 'mysql-test/r/subselect3.result')
-rw-r--r--mysql-test/r/subselect3.result54
1 files changed, 27 insertions, 27 deletions
diff --git a/mysql-test/r/subselect3.result b/mysql-test/r/subselect3.result
index bcaa056adc9..36f94445bc4 100644
--- a/mysql-test/r/subselect3.result
+++ b/mysql-test/r/subselect3.result
@@ -261,7 +261,7 @@ from t2;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00
2 DEPENDENT SUBQUERY t1 ref_or_null a a 5 func 2 100.00 Using where; Full scan on NULL key
-2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 100 100.00 Using where; Using join buffer
+2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 100 100.00 Using where; Using join buffer (flat, BNL join)
Warnings:
Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`oref` AS `oref`,<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(select `test`.`t1`.`a`,`test`.`t1`.`b` from `test`.`t1` join `test`.`t4` where ((`test`.`t1`.`c` = `test`.`t2`.`oref`) and trigcond(((<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`) or isnull(`test`.`t1`.`a`))) and trigcond(((<cache>(`test`.`t2`.`b`) = `test`.`t1`.`b`) or isnull(`test`.`t1`.`b`)))) having (trigcond(<is_not_null_test>(`test`.`t1`.`a`)) and trigcond(<is_not_null_test>(`test`.`t1`.`b`))))) AS `Z` from `test`.`t2`
@@ -1024,10 +1024,10 @@ explain select t21.* from t21,t22 where t21.a = t22.a and
t22.a in (select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null) and t22.c is null order by t21.a;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY subselect2 ALL unique_key NULL NULL NULL 8 Using temporary; Using filesort
-1 PRIMARY t21 ALL NULL NULL NULL NULL 26 Using where; Using join buffer
-1 PRIMARY t22 ALL NULL NULL NULL NULL 26 Using where; Using join buffer
+1 PRIMARY t21 ALL NULL NULL NULL NULL 26 Using where; Using join buffer (flat, BNL join)
+1 PRIMARY t22 ALL NULL NULL NULL NULL 26 Using where; Using join buffer (flat, BNL join)
2 SUBQUERY t11 ALL NULL NULL NULL NULL 8 Using where
-2 SUBQUERY t12 ALL NULL NULL NULL NULL 8 Using where; Using join buffer
+2 SUBQUERY t12 ALL NULL NULL NULL NULL 8 Using where; Using join buffer (flat, BNL join)
select t21.* from t21,t22 where t21.a = t22.a and
t22.a in (select t12.a from t11, t12 where t11.a in(255,256) and t11.a = t12.a and t11.c is null) and t22.c is null order by t21.a;
a b c
@@ -1058,7 +1058,7 @@ insert into t0 values(2);
explain select * from t1 where 2 in (select a from t0);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t0 ALL NULL NULL NULL NULL 11 Using where; Start temporary; End temporary
-1 PRIMARY t1 ALL NULL NULL NULL NULL 20 Using join buffer
+1 PRIMARY t1 ALL NULL NULL NULL NULL 20 Using join buffer (flat, BNL join)
select * from t1 where 2 in (select a from t0);
a
0
@@ -1085,7 +1085,7 @@ set @@optimizer_switch='default,materialization=off';
explain select * from t1 where 2 in (select a from t0);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t0 ALL NULL NULL NULL NULL 11 Using where; FirstMatch
-1 PRIMARY t1 ALL NULL NULL NULL NULL 20 Using join buffer
+1 PRIMARY t1 ALL NULL NULL NULL NULL 20 Using join buffer (flat, BNL join)
select * from t1 where 2 in (select a from t0);
a
0
@@ -1125,7 +1125,7 @@ insert into t3 select A.a + 10*B.a from t0 A, t0 B;
explain select * from t3 where a in (select kp1 from t1 where kp1<20);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 range kp1 kp1 5 NULL 48 Using where; Using index; LooseScan
-1 PRIMARY t3 ALL NULL NULL NULL NULL 100 Using where; Using join buffer
+1 PRIMARY t3 ALL NULL NULL NULL NULL 100 Using where; Using join buffer (flat, BNL join)
create table t4 (pk int primary key);
insert into t4 select a from t3;
explain select * from t3 where a in (select t1.kp1 from t1,t4 where kp1<20
@@ -1133,7 +1133,7 @@ and t4.pk=t1.c);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 range kp1 kp1 5 NULL 48 Using index condition; Using where; Using MRR; LooseScan
1 PRIMARY t4 eq_ref PRIMARY PRIMARY 4 test.t1.c 1 Using index; FirstMatch(t1)
-1 PRIMARY t3 ALL NULL NULL NULL NULL 100 Using where; Using join buffer
+1 PRIMARY t3 ALL NULL NULL NULL NULL 100 Using where; Using join buffer (flat, BNL join)
drop table t1, t3, t4;
create table t1 (a int) as select * from t0 where a < 5;
set @save_max_heap_table_size=@@max_heap_table_size;
@@ -1142,10 +1142,10 @@ set @@max_heap_table_size= 16384;
explain select count(*) from t0 A, t0 B, t0 C, t0 D where D.a in (select a from t1 E);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY E ALL NULL NULL NULL NULL 5 Start temporary
-1 PRIMARY A ALL NULL NULL NULL NULL 10 Using join buffer
-1 PRIMARY B ALL NULL NULL NULL NULL 10 Using join buffer
-1 PRIMARY C ALL NULL NULL NULL NULL 10 Using join buffer
-1 PRIMARY D ALL NULL NULL NULL NULL 10 Using where; End temporary; Using join buffer
+1 PRIMARY A ALL NULL NULL NULL NULL 10 Using join buffer (flat, BNL join)
+1 PRIMARY B ALL NULL NULL NULL NULL 10 Using join buffer (flat, BNL join)
+1 PRIMARY C ALL NULL NULL NULL NULL 10 Using join buffer (flat, BNL join)
+1 PRIMARY D ALL NULL NULL NULL NULL 10 Using where; End temporary; Using join buffer (flat, BNL join)
flush status;
select count(*) from t0 A, t0 B, t0 C, t0 D where D.a in (select a from t1 E);
count(*)
@@ -1183,26 +1183,26 @@ insert into t3 values (1),(2);
explain select * from t2 where a in (select a from t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Start temporary
-1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where; End temporary; Using join buffer
+1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where; End temporary; Using join buffer (flat, BNL join)
explain select * from t2 where a in (select a from t2);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Start temporary
-1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where; End temporary; Using join buffer
+1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where; End temporary; Using join buffer (flat, BNL join)
explain select * from t2 where a in (select a from t3);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Start temporary
-1 PRIMARY t3 ALL NULL NULL NULL NULL 6 Using where; End temporary; Using join buffer
+1 PRIMARY t3 ALL NULL NULL NULL NULL 6 Using where; End temporary; Using join buffer (flat, BNL join)
explain select * from t1 where a in (select a from t3);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Start temporary
-1 PRIMARY t3 ALL NULL NULL NULL NULL 6 Using where; End temporary; Using join buffer
+1 PRIMARY t3 ALL NULL NULL NULL NULL 6 Using where; End temporary; Using join buffer (flat, BNL join)
drop table t1, t2, t3;
create table t1 (a decimal);
insert into t1 values (1),(2);
explain select * from t1 where a in (select a from t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Start temporary
-1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where; End temporary; Using join buffer
+1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where; End temporary; Using join buffer (flat, BNL join)
drop table t1;
set @@optimizer_switch=@save_optimizer_switch;
create table t1 (a int);
@@ -1219,25 +1219,25 @@ id select_type table type possible_keys key key_len ref rows Extra
explain select straight_join * from t1 A, t1 B where A.a in (select a from t2);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY A ALL NULL NULL NULL NULL 10 Using where
-1 PRIMARY B ALL NULL NULL NULL NULL 10 Using join buffer
+1 PRIMARY B ALL NULL NULL NULL NULL 10 Using join buffer (flat, BNL join)
2 SUBQUERY t2 ALL NULL NULL NULL NULL 10
explain select * from t2 where a in (select straight_join A.a from t1 A, t1 B);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 10 Using where
2 SUBQUERY A ALL NULL NULL NULL NULL 10
-2 SUBQUERY B ALL NULL NULL NULL NULL 10 Using join buffer
+2 SUBQUERY B ALL NULL NULL NULL NULL 10 Using join buffer (flat, BNL join)
explain select * from t2 where a in (select straight_join A.a from t1 A, t1 B);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 10 Using where
2 SUBQUERY A ALL NULL NULL NULL NULL 10
-2 SUBQUERY B ALL NULL NULL NULL NULL 10 Using join buffer
+2 SUBQUERY B ALL NULL NULL NULL NULL 10 Using join buffer (flat, BNL join)
explain select straight_join * from t2 X, t2 Y
where X.a in (select straight_join A.a from t1 A, t1 B);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY X ALL NULL NULL NULL NULL 10 Using where
-1 PRIMARY Y ALL NULL NULL NULL NULL 10 Using join buffer
+1 PRIMARY Y ALL NULL NULL NULL NULL 10 Using join buffer (flat, BNL join)
2 SUBQUERY A ALL NULL NULL NULL NULL 10
-2 SUBQUERY B ALL NULL NULL NULL NULL 10 Using join buffer
+2 SUBQUERY B ALL NULL NULL NULL NULL 10 Using join buffer (flat, BNL join)
create table t0 (a int, b int);
insert into t0 values(1,1);
explain select * from t0, t3 where t3.a in (select a from t2) and (t3.a < 10 or t3.a >30);
@@ -1262,11 +1262,11 @@ create table t2 as select * from t1;
explain select * from t2 where a in (select b from t1 where a=3);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 range a a 5 NULL 8 Using where; Using index; LooseScan
-1 PRIMARY t2 ALL NULL NULL NULL NULL 100 Using where; Using join buffer
+1 PRIMARY t2 ALL NULL NULL NULL NULL 100 Using where; Using join buffer (flat, BNL join)
explain select * from t2 where (b,a) in (select a,b from t1 where a=3);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 range a a 5 NULL 8 Using where; Using index; LooseScan
-1 PRIMARY t2 ALL NULL NULL NULL NULL 100 Using where; Using join buffer
+1 PRIMARY t2 ALL NULL NULL NULL NULL 100 Using where; Using join buffer (flat, BNL join)
drop table t1,t2;
create table t1 (a int, b int);
insert into t1 select a,a from t0;
@@ -1324,8 +1324,8 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3
1 PRIMARY subselect2 eq_ref unique_key unique_key 15 func 1
2 SUBQUERY X ALL NULL NULL NULL NULL 6 Using where
-2 SUBQUERY Y ALL NULL NULL NULL NULL 6 Using join buffer
-2 SUBQUERY Z ALL NULL NULL NULL NULL 6 Using join buffer
+2 SUBQUERY Y ALL NULL NULL NULL NULL 6 Using join buffer (flat, BNL join)
+2 SUBQUERY Z ALL NULL NULL NULL NULL 6 Using join buffer (flat, BNL join)
drop table t0,t1,t2;
BUG#37842: Assertion in DsMrr_impl::dsmrr_init, at handler.cc:4307
@@ -1396,7 +1396,7 @@ WHERE cona.postalStripped='T2H3B2'
);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY subselect2 ALL unique_key NULL NULL NULL 2 1.00
-1 PRIMARY a index PRIMARY PRIMARY 4 NULL 2 100.00 Using where; Using index; Using join buffer
+1 PRIMARY a index PRIMARY PRIMARY 4 NULL 2 100.00 Using where; Using index; Using join buffer (flat, BNL join)
2 SUBQUERY cona ALL NULL NULL NULL NULL 2 100.00 Using where
2 SUBQUERY c eq_ref PRIMARY PRIMARY 4 test.cona.idContact 1 100.00
Warnings: