summaryrefslogtreecommitdiff
path: root/mysql-test/main/subselect.test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-08-16 10:08:30 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-08-16 10:08:30 +0300
commit734db318ac69f60959bcd0d6c9116a3681449a38 (patch)
treecb8ccd4ecfebe752ec559834d3bf083efb9c8cd4 /mysql-test/main/subselect.test
parentb151cc2b0b1fc938de91035fbafc46667d9019e3 (diff)
parent8716bb3b72b7f5fed69b6dde413c2138f6d175b2 (diff)
downloadmariadb-git-734db318ac69f60959bcd0d6c9116a3681449a38.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/main/subselect.test')
-rw-r--r--mysql-test/main/subselect.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/main/subselect.test b/mysql-test/main/subselect.test
index 37d57e51f1b..86ac9649d16 100644
--- a/mysql-test/main/subselect.test
+++ b/mysql-test/main/subselect.test
@@ -6098,6 +6098,21 @@ and t1.a in (select `test`.`t3`.`c` from `test`.`t3`);
SET @@optimizer_switch= @optimiser_switch_save;
DROP TABLE t1, t2, t3;
+--echo #
+--echo # MDEV-16820: impossible where with inexpensive subquery
+--echo #
+
+create table t1 (a int) engine=myisam;
+insert into t1 values (3), (1), (7);
+
+create table t2 (b int, index idx(b));
+insert into t2 values (2), (5), (3), (2);
+
+explain select * from t1 where (select max(b) from t2) = 10;
+explain select * from t1 where (select max(b) from t2) = 10 and t1.a > 3;
+
+drop table t1,t2;
+
--echo End of 5.5 tests
--echo # End of 10.0 tests