• unknown's avatar
    Bug#24751 - Possible infinit loop in init_io_cache() when insufficient memory · 2cbccbfb
    unknown authored
    - When cache memory can't be allocated size is recaclulated using 3/4 of
      the requested memory. This number is rounded up to the nearest 
      min_cache step. 
      However with the previous implementation the new cache size might
      become bigger than requested because of this rounding and thus we get
      an infinit loop.
    - This patch fixes this problem by ensuring that the new cache size
      always will be smaller on the second and subsequent iterations until
      we reach min_cache.
    
    
    mysys/mf_iocache.c:
      - Added mask to cachesize to ensure that algorithm always produce a 
        smaller cache size than current, until we reach 'min_cache' size.
    2cbccbfb
mf_iocache.c 56.2 KB