Commit 590416e2 authored by Sergei Petrunia's avatar Sergei Petrunia

Stabilize a testcase in subselect_sj2_mat

parent 6d179ad1
......@@ -1737,6 +1737,12 @@ CREATE TABLE t1 (f1 varchar(8), KEY(f1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('qux'),('foo');
CREATE TABLE t2 (f2 varchar(8)) ENGINE=InnoDB;
INSERT INTO t2 VALUES ('bar'),('foo'),('qux'),('qq1'),('qq2');
analyze table t1,t2 persistent for all;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
test.t2 analyze status Engine-independent statistics collected
test.t2 analyze status OK
SELECT f1 FROM t1
WHERE f1 IN ( SELECT f2 FROM t2 WHERE f2 > 'bar' )
HAVING f1 != 'foo'
......@@ -1748,9 +1754,8 @@ WHERE f1 IN ( SELECT f2 FROM t2 WHERE f2 > 'bar' )
HAVING f1 != 'foo'
ORDER BY f1;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 index f1 f1 11 NULL 2 Using where; Using index
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 11 func 1
2 MATERIALIZED t2 ALL NULL NULL NULL NULL 5 Using where
1 PRIMARY t1 index f1 f1 11 NULL 2 Using where; Using index; Using temporary; Using filesort
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 Using where; FirstMatch(t1); Using join buffer (flat, BNL join)
DROP TABLE t1,t2;
#
# MDEV-16225: wrong resultset from query with semijoin=on
......
......@@ -301,6 +301,7 @@ CREATE TABLE t1 (f1 varchar(8), KEY(f1)) ENGINE=InnoDB;
INSERT INTO t1 VALUES ('qux'),('foo');
CREATE TABLE t2 (f2 varchar(8)) ENGINE=InnoDB;
INSERT INTO t2 VALUES ('bar'),('foo'),('qux'),('qq1'),('qq2');
analyze table t1,t2 persistent for all;
let $q=
SELECT f1 FROM t1
......
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