Commit b00019ef authored by marko's avatar marko

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.
parent ee99d219
...@@ -1896,7 +1896,6 @@ row_ins_duplicate_error_in_clust( ...@@ -1896,7 +1896,6 @@ row_ins_duplicate_error_in_clust(
err = DB_DUPLICATE_KEY; err = DB_DUPLICATE_KEY;
goto func_exit; goto func_exit;
} }
mem_heap_free(heap);
} }
ut_a(!(cursor->index->type & DICT_CLUSTERED)); ut_a(!(cursor->index->type & DICT_CLUSTERED));
...@@ -1905,6 +1904,9 @@ row_ins_duplicate_error_in_clust( ...@@ -1905,6 +1904,9 @@ row_ins_duplicate_error_in_clust(
err = DB_SUCCESS; err = DB_SUCCESS;
func_exit: func_exit:
if (UNIV_LIKELY_NULL(heap)) {
mem_heap_free(heap);
}
return(err); return(err);
#else /* UNIV_HOTBACKUP */ #else /* UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in /* This function depends on MySQL code that is not included in
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment