1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

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.
This commit is contained in:
Sergey Petrunya
2013-09-26 14:42:30 +04:00
parent 7d60030c02
commit 0b69c44e94
6 changed files with 65 additions and 50 deletions

View File

@ -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;