In allocate_dynamic() fixed return value on error.

The previous value probably was copied from alloc_dynamic() where it
means number of elements.
This commit is contained in:
Oleksandr Byelkin 2024-12-12 12:36:42 +01:00
parent 9a25f2a5bb
commit 95fdfb733d

View file

@ -248,7 +248,7 @@ my_bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements)
if (!(new_ptr= (uchar *) my_malloc(array->m_psi_key, size *
array->size_of_element,
MYF(array->malloc_flags | MY_WME))))
DBUG_RETURN(0);
DBUG_RETURN(TRUE);
memcpy(new_ptr, array->buffer,
array->elements * array->size_of_element);
array->malloc_flags&= ~MY_INIT_BUFFER_USED;