Stabilize main.subselect_sj2* tests

This commit is contained in:
Sergei Petrunia 2022-09-09 19:09:23 +03:00
parent d9d9c90a3d
commit ec6aa2829a
4 changed files with 22 additions and 9 deletions

View File

@ -106,11 +106,15 @@ primary key(pk1, pk2)
insert into t3 select
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;
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);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 ALL b NULL NULL NULL #
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func #
2 MATERIALIZED t0 ALL NULL NULL NULL NULL #
1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL #
1 PRIMARY t3 ref b b 5 test.t0.a #
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);
a b pk1 pk2
0 0 0 0

View File

@ -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
from t0 A, t0 B where B.a <5;
analyze table t3 persistent for all;
--replace_column 9 #
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);

View File

@ -117,11 +117,15 @@ primary key(pk1, pk2)
insert into t3 select
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;
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);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 ALL b NULL NULL NULL #
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func #
2 MATERIALIZED t0 ALL NULL NULL NULL NULL #
1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL #
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 # Using where
select * from t3 where b in (select A.a+B.a from t0 A, t0 B where B.a<5);
a b pk1 pk2
0 0 0 0

View File

@ -108,11 +108,15 @@ primary key(pk1, pk2)
insert into t3 select
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;
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);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 ALL b NULL NULL NULL #
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func #
2 MATERIALIZED t0 ALL NULL NULL NULL NULL #
1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL #
1 PRIMARY t3 ref b b 5 test.t0.a #
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);
a b pk1 pk2
0 0 0 0