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:
marko 2006-03-21 09:15:28 +00:00
parent f015b825fe
commit ea96a298fe

View file

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