Commit f8c7e347 authored by Sergey Petrunya's avatar Sergey Petrunya

MDEV-5349: Test main.subselect_sj_jcl6 fails sporadically due to insufficient ordering

- Add --sorted_result to the query
parent 50808b30
......@@ -2931,10 +2931,10 @@ CREATE TABLE t3 (c3 VARCHAR(1)) ENGINE=MyISAM;
INSERT INTO t3 VALUES ('x'),('d');
SELECT * FROM t1, t2 WHERE pk IN ( SELECT pk FROM t1 LEFT JOIN t3 ON (c1 = c3 ) ) ORDER BY c2, c1;
pk c1 c2
4 NULL x
3 c x
1 v x
2 v x
3 c x
4 NULL x
5 x x
# This should show that "t1 left join t3" is still in the semi-join nest:
EXPLAIN EXTENDED
......
......@@ -2945,10 +2945,10 @@ CREATE TABLE t3 (c3 VARCHAR(1)) ENGINE=MyISAM;
INSERT INTO t3 VALUES ('x'),('d');
SELECT * FROM t1, t2 WHERE pk IN ( SELECT pk FROM t1 LEFT JOIN t3 ON (c1 = c3 ) ) ORDER BY c2, c1;
pk c1 c2
4 NULL x
3 c x
1 v x
2 v x
3 c x
4 NULL x
5 x x
# This should show that "t1 left join t3" is still in the semi-join nest:
EXPLAIN EXTENDED
......
......@@ -2634,6 +2634,7 @@ INSERT INTO t2 VALUES ('x');
CREATE TABLE t3 (c3 VARCHAR(1)) ENGINE=MyISAM;
INSERT INTO t3 VALUES ('x'),('d');
--sorted_result
SELECT * FROM t1, t2 WHERE pk IN ( SELECT pk FROM t1 LEFT JOIN t3 ON (c1 = c3 ) ) ORDER BY c2, c1;
--echo # This should show that "t1 left join t3" is still in the semi-join nest:
......
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