diff options
Diffstat (limited to 'mysql-test/main/subselect.result')
-rw-r--r-- | mysql-test/main/subselect.result | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/mysql-test/main/subselect.result b/mysql-test/main/subselect.result index d5034bc49b0..404d878a9ec 100644 --- a/mysql-test/main/subselect.result +++ b/mysql-test/main/subselect.result @@ -7079,12 +7079,6 @@ call procedure2(); ControlRev NULL drop procedure procedure2; -SELECT -(SELECT user FROM mysql.user -WHERE h.host in (SELECT host FROM mysql.user) -) AS sq -FROM mysql.host h GROUP BY h.host; -sq # # MDEV-7846:Server crashes in Item_subselect::fix #_fields or fails with Thread stack overrun @@ -7237,6 +7231,22 @@ a 5 SET @@optimizer_switch= @optimiser_switch_save; DROP TABLE t1, t2, t3; +# +# MDEV-16820: impossible where with inexpensive subquery +# +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; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +explain select * from t1 where (select max(b) from t2) = 10 and t1.a > 3; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE +2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +drop table t1,t2; End of 5.5 tests # End of 10.0 tests # |