Commit ec6aa282 authored by Sergei Petrunia's avatar Sergei Petrunia

Stabilize main.subselect_sj2* tests

parent d9d9c90a
...@@ -106,11 +106,15 @@ primary key(pk1, pk2) ...@@ -106,11 +106,15 @@ primary key(pk1, pk2)
insert into t3 select insert into t3 select
A.a + 10*B.a, A.a + 10*B.a, A.a + 10*B.a, A.a + 10*B.a A.a + 10*B.a, A.a + 10*B.a, A.a + 10*B.a, A.a + 10*B.a
from t0 A, t0 B where B.a <5; from t0 A, t0 B where B.a <5;
analyze table t3 persistent for all;
Table Op Msg_type Msg_text
test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
explain select * from t3 where b in (select a from t0); explain select * from t3 where b in (select a from t0);
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 ALL b NULL NULL NULL # 1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL #
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func # 1 PRIMARY t3 ref b b 5 test.t0.a #
2 MATERIALIZED t0 ALL NULL NULL NULL NULL # 2 MATERIALIZED t0 ALL NULL NULL NULL NULL # Using where
select * from t3 where b in (select A.a+B.a from t0 A, t0 B where B.a<5); select * from t3 where b in (select A.a+B.a from t0 A, t0 B where B.a<5);
a b pk1 pk2 a b pk1 pk2
0 0 0 0 0 0 0 0
......
...@@ -87,6 +87,7 @@ insert into t3 select ...@@ -87,6 +87,7 @@ insert into t3 select
A.a + 10*B.a, A.a + 10*B.a, A.a + 10*B.a, A.a + 10*B.a A.a + 10*B.a, A.a + 10*B.a, A.a + 10*B.a, A.a + 10*B.a
from t0 A, t0 B where B.a <5; from t0 A, t0 B where B.a <5;
analyze table t3 persistent for all;
--replace_column 9 # --replace_column 9 #
explain select * from t3 where b in (select a from t0); explain select * from t3 where b in (select a from t0);
select * from t3 where b in (select A.a+B.a from t0 A, t0 B where B.a<5); select * from t3 where b in (select A.a+B.a from t0 A, t0 B where B.a<5);
......
...@@ -117,11 +117,15 @@ primary key(pk1, pk2) ...@@ -117,11 +117,15 @@ primary key(pk1, pk2)
insert into t3 select insert into t3 select
A.a + 10*B.a, A.a + 10*B.a, A.a + 10*B.a, A.a + 10*B.a A.a + 10*B.a, A.a + 10*B.a, A.a + 10*B.a, A.a + 10*B.a
from t0 A, t0 B where B.a <5; from t0 A, t0 B where B.a <5;
analyze table t3 persistent for all;
Table Op Msg_type Msg_text
test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
explain select * from t3 where b in (select a from t0); explain select * from t3 where b in (select a from t0);
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 ALL b NULL NULL NULL # 1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL #
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func # 1 PRIMARY t3 ref b b 5 test.t0.a # Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
2 MATERIALIZED t0 ALL NULL NULL NULL NULL # 2 MATERIALIZED t0 ALL NULL NULL NULL NULL # Using where
select * from t3 where b in (select A.a+B.a from t0 A, t0 B where B.a<5); select * from t3 where b in (select A.a+B.a from t0 A, t0 B where B.a<5);
a b pk1 pk2 a b pk1 pk2
0 0 0 0 0 0 0 0
......
...@@ -108,11 +108,15 @@ primary key(pk1, pk2) ...@@ -108,11 +108,15 @@ primary key(pk1, pk2)
insert into t3 select insert into t3 select
A.a + 10*B.a, A.a + 10*B.a, A.a + 10*B.a, A.a + 10*B.a A.a + 10*B.a, A.a + 10*B.a, A.a + 10*B.a, A.a + 10*B.a
from t0 A, t0 B where B.a <5; from t0 A, t0 B where B.a <5;
analyze table t3 persistent for all;
Table Op Msg_type Msg_text
test.t3 analyze status Engine-independent statistics collected
test.t3 analyze status OK
explain select * from t3 where b in (select a from t0); explain select * from t3 where b in (select a from t0);
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 ALL b NULL NULL NULL # 1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL #
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func # 1 PRIMARY t3 ref b b 5 test.t0.a #
2 MATERIALIZED t0 ALL NULL NULL NULL NULL # 2 MATERIALIZED t0 ALL NULL NULL NULL NULL # Using where
select * from t3 where b in (select A.a+B.a from t0 A, t0 B where B.a<5); select * from t3 where b in (select A.a+B.a from t0 A, t0 B where B.a<5);
a b pk1 pk2 a b pk1 pk2
0 0 0 0 0 0 0 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment