From 95fdfb733d28e8e0d558d9ddd4d648830c46189f Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Thu, 12 Dec 2024 12:36:42 +0100 Subject: [PATCH] In allocate_dynamic() fixed return value on error. The previous value probably was copied from alloc_dynamic() where it means number of elements. --- mysys/array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysys/array.c b/mysys/array.c index 29527ab5145..11e44d463ab 100644 --- a/mysys/array.c +++ b/mysys/array.c @@ -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;