diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2017-10-06 17:52:35 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@sanjaLaptopT> | 2017-12-19 15:37:30 +0100 |
commit | 522589466004293a8c0df822eb6343d87ecea158 (patch) | |
tree | 3390f719246dea52c3dc7c86ad79629490744cd0 /mysql-test/r/subselect_no_mat.result | |
parent | 273591df0c9917a93bc2d695f61d9f35fa7b1f5c (diff) | |
download | mariadb-git-bb-5.5-MDEV-13933.tar.gz |
MDEV-13933: Wrong results in COUNT() query with EXISTS and exists_to_inbb-5.5-MDEV-13933
Roll back to most general duplicate removing strategi in case of different stratagies for one position.
Diffstat (limited to 'mysql-test/r/subselect_no_mat.result')
-rw-r--r-- | mysql-test/r/subselect_no_mat.result | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/r/subselect_no_mat.result b/mysql-test/r/subselect_no_mat.result index a71df97e6bc..25ef4a76962 100644 --- a/mysql-test/r/subselect_no_mat.result +++ b/mysql-test/r/subselect_no_mat.result @@ -7143,6 +7143,32 @@ SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2; (SELECT MAX(sq.f2) FROM t1) NULL drop table t1, t2; +# +# MDEV-13933: Wrong results in COUNT() query with EXISTS and exists_to_in +# (5.5 test) +# +SET @optimiser_switch_save= @@optimizer_switch; +CREATE TABLE t1 (a INT NOT NULL); +INSERT INTO t1 VALUES (1),(1),(1),(5),(5); +CREATE TABLE t2 (b INT); +INSERT INTO t2 VALUES (5),(1); +CREATE TABLE t3 (c INT, KEY(c)); +INSERT INTO t3 VALUES (5),(5); +SET optimizer_switch='semijoin=on'; +select t1.a from t1 where t1.a in (select `test`.`t2`.`b` from `test`.`t2`) +and t1.a in (select `test`.`t3`.`c` from `test`.`t3`); +a +5 +5 +SET optimizer_switch='semijoin=off'; +select t1.a from t1 where t1.a in (select `test`.`t2`.`b` from `test`.`t2`) +and t1.a in (select `test`.`t3`.`c` from `test`.`t3`); +a +5 +5 +SET @@optimizer_switch= @optimiser_switch_save; +DROP TABLE t1, t2, t3; +End of 5.5 tests set optimizer_switch=default; select @@optimizer_switch like '%materialization=on%'; @@optimizer_switch like '%materialization=on%' |