diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-02-01 00:54:03 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-02-01 00:54:03 +0100 |
commit | 59d9d08e2b6f6f35e781d24c47d33d26fb4ba2a5 (patch) | |
tree | 3e4a302ccf3912d4d8a40aa271414003bfe7c9b6 /mysql-test/r/subselect_mat.result | |
parent | ce02738d7f2f2688eeec7004dd6a30293d36044f (diff) | |
parent | 6b6d40fa6ca1fe36f2a51c2723c58dfb3fc025bb (diff) | |
download | mariadb-git-59d9d08e2b6f6f35e781d24c47d33d26fb4ba2a5.tar.gz |
5.5 merge
Diffstat (limited to 'mysql-test/r/subselect_mat.result')
-rw-r--r-- | mysql-test/r/subselect_mat.result | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/mysql-test/r/subselect_mat.result b/mysql-test/r/subselect_mat.result index 22a5c3abd78..cd78d9f93fb 100644 --- a/mysql-test/r/subselect_mat.result +++ b/mysql-test/r/subselect_mat.result @@ -2037,6 +2037,24 @@ INSERT INTO t1 VALUES (1,3,5),(2,4,6); SELECT * FROM t1 WHERE 8 IN (SELECT MIN(pk) FROM t1) AND (pk = a OR pk = b); pk a b DROP TABLE t1; +# +# MDEV-5368: Server crashes in Item_in_subselect::optimize on 2nd +# execution of PS with IN subqueries, materialization+semijoin +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(3); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM t2; +INSERT INTO t2 VALUES (8),(9); +PREPARE stmt FROM " +SELECT * FROM t1 WHERE 1 IN ( SELECT b FROM v2 WHERE 2 IN ( SELECT MAX(a) FROM t1 ) ) +"; +EXECUTE stmt; +a +EXECUTE stmt; +a +DROP TABLE t1, t2; +DROP VIEW v2; # End of 5.3 tests # # MDEV-5056: Wrong result (extra rows) with materialization+semijoin, IN subqueries @@ -2058,6 +2076,24 @@ CA ML CA ML CA ML RO ML DROP TABLE t1,t2; set join_cache_level=@tmp_mdev5056; +# +# MDEV-5368: Server crashes in Item_in_subselect::optimize on 2nd +# execution of PS with IN subqueries, materialization+semijoin +# +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1),(3); +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +CREATE ALGORITHM=MERGE VIEW v2 AS SELECT * FROM t2; +INSERT INTO t2 VALUES (8),(9); +PREPARE stmt FROM " +SELECT * FROM t1 WHERE 1 IN ( SELECT b FROM v2 WHERE 2 IN ( SELECT MAX(a) FROM t1 ) ) +"; +EXECUTE stmt; +a +EXECUTE stmt; +a +DROP TABLE t1, t2; +DROP VIEW v2; # End of 5.5 tests set @subselect_mat_test_optimizer_switch_value=null; set @@optimizer_switch='materialization=on,in_to_exists=off,semijoin=off'; |