diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-01-11 10:16:38 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-01-11 10:16:52 +0200 |
commit | 4c1479545d10ba9047b01be1c663ad4d1fad39a1 (patch) | |
tree | 76f55015566d7057f64bd33d74d5d4b32be337c3 /mysql-test/r/subselect.result | |
parent | c903ba2f1ef5564d0eafd2803342f11cecb9bf01 (diff) | |
parent | bdcd7f79e4a33e08bae31a86cee98e23ff6824ff (diff) | |
download | mariadb-git-4c1479545d10ba9047b01be1c663ad4d1fad39a1.tar.gz |
Merge 5.5 into 10.0
Diffstat (limited to 'mysql-test/r/subselect.result')
-rw-r--r-- | mysql-test/r/subselect.result | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 3fa7fef89b2..79b2810d529 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -7186,3 +7186,29 @@ NULL # SELECT (SELECT MAX(sq.f2) FROM t1) FROM (SELECT * FROM t2) AS sq WHERE f2 = 2; # 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 |