diff options
Diffstat (limited to 'mysql-test/t/having.test')
-rw-r--r-- | mysql-test/t/having.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/t/having.test b/mysql-test/t/having.test index 3675a09d82f..c9231fef3be 100644 --- a/mysql-test/t/having.test +++ b/mysql-test/t/having.test @@ -759,6 +759,24 @@ SELECT * FROM t1 JOIN t2 ON c1 = c2 HAVING c2 > 'a' ORDER BY c2 LIMIT 1; DROP TABLE t1,t2; +--echo # +--echo # MDEV-6736: Valgrind warnings 'Invalid read' in subselect_engine::calc_const_tables with SQ +--echo # in WHERE and HAVING, ORDER BY, materialization+semijoin +--echo # + +CREATE TABLE t1 (a INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (3),(8); + +CREATE TABLE t2 (b INT) ENGINE=MyISAM; +INSERT INTO t2 VALUES (2),(1); + +SELECT a FROM t1 +WHERE 9 IN ( SELECT MIN( a ) FROM t1 ) +HAVING a <> ( SELECT COUNT(*) FROM t2 ) +ORDER BY a; + +DROP TABLE t1,t2; + --echo End of 10.0 tests --echo # |