• V Narayanan's avatar
    Bug#43572 Handle failures from hash_init · 58e77cb4
    V Narayanan authored
    This patch is a follow up to http://lists.mysql.com/commits/76678.
    When an allocation failure occurs for the buffer in the dynamic
    array, an error condition was being set. The dynamic array is
    usable even if the memory allocation fails. Since in most cases
    the thread can continue to work without any problems the error
    condition should not be set here.
    
    This patch adds logic to remove the error condition from being set
    when the memory allocation for the buffer in dynamic array fails.
    
    mysys/array.c:
      Bug#43572 Handle failures from hash_init
      
      Remove the MY_WME flag from the call to malloc in order to
      prevent the error status from being set in the init_dynamic_array
      method. Since this memory allocation failure is no longer
      fatal this method has been modified to return FALSE
      (indicate success) irrespective of array->buffer being
      allocated.
    58e77cb4
array.c 6.39 KB