[MDEV-11602] InnoDB leaks foreign key metadata on DDL operations Created: 2016-12-19  Updated: 2016-12-19  Resolved: 2016-12-19

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.0.15, 10.1.2, 10.2.0
Fix Version/s: 10.0.29, 10.1.21, 10.2.3

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: valgrind
Environment:

Debian GNU/Linux


Issue Links:
Relates
relates to MDEV-6759 innodb valgrind failures Closed
relates to MDEV-9105 Test failures under valgrind Closed

 Description   

A memory leak was introduced in MDEV-6759 to address a ‘valgrind failure’ which looks like a double free when running ./mtr main.alter_table. Here is a simple test case that will trigger LeakSanitizer when building 10.1 with cmake -DWITH_ASAN=ON:

--source include/have_innodb.inc
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=INNODB;
CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, FOREIGN KEY (t1_id) REFERENCES t1(id)) ENGINE=INNODB;
DROP TABLE t2,t1;

With a fix in place, these memory leaks are gone, but there are some others. In 10.1.21, all of --suite=innodb,innodb_fts,innodb_zip,encryption completed fine. So did main.alter_table. Tests for --suite=main are still running.

I will test 10.0 too to see if a double free in main.alter_table can be observed there.



 Comments   
Comment by Marko Mäkelä [ 2016-12-19 ]

Please review the patch on the commits list.

Comment by Jan Lindström (Inactive) [ 2016-12-19 ]

ok to push.

Generated at Thu Feb 08 07:51:14 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.