From 0b69c44e945658e82b4c5d532694795136018f12 Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Thu, 26 Sep 2013 14:42:30 +0400 Subject: MDEV-5067: Valgrind warnings (Invalid read) in QPF_table_access::print_explain - Query plan footprint (in new terms, "EXPLAIN structure") should always keep a copy of key_name. This is because the table might be a temporary table which may be already freed by the time we use query plan footprint. --- mysql-test/t/explain_non_select.test | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mysql-test/t/explain_non_select.test') diff --git a/mysql-test/t/explain_non_select.test b/mysql-test/t/explain_non_select.test index 316720b17f3..2ca47ff8025 100644 --- a/mysql-test/t/explain_non_select.test +++ b/mysql-test/t/explain_non_select.test @@ -106,4 +106,12 @@ explain replace into t1 select * from t0; drop table t0, t1; +--echo # +--echo # MDEV-5067: Valgrind warnings (Invalid read) in QPF_table_access::print_explain +--echo # +CREATE TABLE t1 (i INT) ENGINE=MyISAM; +INSERT INTO t1 VALUES (7),(0),(9); + +SELECT * FROM t1 INNER JOIN ( SELECT DISTINCT * FROM t1 ) AS sq ON (sq.i = t1.i); +DROP TABLE t1; -- cgit v1.2.1