mirror of
https://github.com/MariaDB/server.git
synced 2025-01-24 07:44:22 +01:00
Merge r355 from branches/5.0: Remove a memory leak when trying to insert
a duplicate record to a clustered index comprising more than about 90 columns. (Bug #18384) row_ins_duplicate_error_in_clust(): Call mem_heap_free(heap) at func_exit if needed.
This commit is contained in:
parent
f015b825fe
commit
ea96a298fe
1 changed files with 3 additions and 1 deletions
|
@ -1896,7 +1896,6 @@ row_ins_duplicate_error_in_clust(
|
|||
err = DB_DUPLICATE_KEY;
|
||||
goto func_exit;
|
||||
}
|
||||
mem_heap_free(heap);
|
||||
}
|
||||
|
||||
ut_a(!(cursor->index->type & DICT_CLUSTERED));
|
||||
|
@ -1905,6 +1904,9 @@ row_ins_duplicate_error_in_clust(
|
|||
|
||||
err = DB_SUCCESS;
|
||||
func_exit:
|
||||
if (UNIV_LIKELY_NULL(heap)) {
|
||||
mem_heap_free(heap);
|
||||
}
|
||||
return(err);
|
||||
#else /* UNIV_HOTBACKUP */
|
||||
/* This function depends on MySQL code that is not included in
|
||||
|
|
Loading…
Add table
Reference in a new issue