Bug #18384 InnoDB memory leak on duplicate key errors in 5.0 if row has many columns
Submitted: 21 Mar 2006 9:14 Modified: 11 Apr 2006 4:15
Reporter: Heikki Tuuri
Status: Closed
Category:Server: InnoDB Severity:S2 (Serious)
Version:5.0.3 and later OS:Any (All)
Assigned to: Marko Mäkelä Target Version:

[21 Mar 2006 9:14] Heikki Tuuri
Description:
InnoDB leaks memory in the code below because it forgets to free heap. The leak only
happens with rows with about 90 columns or more.

row0ins.c:

        if (cursor->low_match >= n_unique) {

                rec = btr_cur_get_rec(cursor);

                if (!page_rec_is_infimum(rec)) {
                        offsets = rec_get_offsets(rec, cursor->index, offsets,
                                                ULINT_UNDEFINED, &heap);

Marko has a patch here:

http://bugs.mysql.com/bug.php?id=17674

How to repeat:
Use INSERT IGNORE to a table with many duplicates.

Suggested fix:
Marko has a patch.
[21 Mar 2006 10:14] Marko Mäkelä
I have committed the patch to the InnoDB source code repository.
[5 Apr 2006 21:19] Elliot Murphy
Fixed in InnoDB snapshot368; fixes are in 5.0.20.
[11 Apr 2006 4:15] Paul DuBois
Noted in 5.0.20 changelog.

<literal>InnoDB</literal> had a memory leak for duplicate-key
errors with tables having 90 columns or more. (Bug #18384)