summaryrefslogtreecommitdiff
path: root/mysql-test/r/having.result
diff options
context:
space:
mode:
authorVarun Gupta <varunraiko1803@gmail.com>2018-03-16 18:57:21 +0530
committerVarun Gupta <varunraiko1803@gmail.com>2018-03-17 10:51:19 +0530
commite3dd9a95e50ef2019435b01bd9e161d552673a28 (patch)
tree6e30a3ba05cb0582d1567e82d80fe8a726662d31 /mysql-test/r/having.result
parent3d5dff6cae5cdefe376583f811c9af109ea08080 (diff)
downloadmariadb-git-e3dd9a95e50ef2019435b01bd9e161d552673a28.tar.gz
MDEV-6736: Valgrind warnings 'Invalid read' in subselect_engine::calc_const_tables with SQ in WHERE and
HAVING, ORDER BY, materialization+semijoin During cleanup a pointer to the materialised table that was freed was not set to NULL
Diffstat (limited to 'mysql-test/r/having.result')
-rw-r--r--mysql-test/r/having.result14
1 files changed, 14 insertions, 0 deletions
diff --git a/mysql-test/r/having.result b/mysql-test/r/having.result
index 0b933427303..c509458d830 100644
--- a/mysql-test/r/having.result
+++ b/mysql-test/r/having.result
@@ -723,4 +723,18 @@ SELECT * FROM t1 JOIN t2 ON c1 = c2 HAVING c2 > 'a' ORDER BY c2 LIMIT 1;
c1 c2
x x
DROP TABLE t1,t2;
+#
+# MDEV-6736: Valgrind warnings 'Invalid read' in subselect_engine::calc_const_tables with SQ
+# in WHERE and HAVING, ORDER BY, materialization+semijoin
+#
+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;
+a
+DROP TABLE t1,t2;
End of 10.0 tests