From fecad7c945f26a3677b17ae6f831ee222d6fc98a Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Mon, 20 Feb 2012 15:30:54 +0400 Subject: BUG#933407: Valgrind warnings in mark_as_null_row with materialization+semijoin, STRAIGHT_JOIN, impossible WHERE - In return_zero_rows(), don't call mark_as_null_row() for semi-join materialized tables, because 1) they may have been already freed, and 2)there is no real need to call mark_as_null_row() for them. --- mysql-test/r/subselect_mat.result | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'mysql-test/r/subselect_mat.result') diff --git a/mysql-test/r/subselect_mat.result b/mysql-test/r/subselect_mat.result index 6f90cc868a6..4d02e5012e2 100644 --- a/mysql-test/r/subselect_mat.result +++ b/mysql-test/r/subselect_mat.result @@ -1848,6 +1848,19 @@ a b 7 5 3 3 drop table t1,t2; +# +# BUG#933407: Valgrind warnings in mark_as_null_row with materialization+semijoin, STRAIGHT_JOIN, impossible WHERE +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (0),(8); +SELECT STRAIGHT_JOIN MIN(a) FROM t1 +WHERE a IN ( +SELECT a FROM t1 +WHERE 'condition'='impossible' + ); +MIN(a) +NULL +DROP TABLE t1; # This must be at the end: set optimizer_switch=@subselect_sj_mat_tmp; set join_cache_level=@save_join_cache_level; -- cgit v1.2.1