• Sergei Petrunia's avatar
    MDEV-9764: MariaDB does not limit memory used for range optimization · 01679040
    Sergei Petrunia authored
    A partial backport of 67f21fb3a077dedfd14b9ca720e926c55e682f93,
    Bug#22283790: RANGE OPTIMIZER UTILIZES TOO MUCH MEMORY WITH MANY OR CONDITIONS
    
    The backported part changes SEL_TREE::keys from being an array of
    MAX_KEY elements (64*8=512 bytes) to a Mem_root_array<SEL_ARG*> (32 bytes +
    alloc'ed array of as many elements as we need).
    
    The patch doesn't fix the "not limiting memory" part, but the memory usage
    is much lower with it.
    01679040
mem_root_array.h 6.77 KB