• Sergei Petrunia's avatar
    MDEV-17783: AddressSanitizer: stack-buffer-overflow in table_cond_selectivity · cdb29960
    Sergei Petrunia authored
    A less-intrusive fix: don't have table_cond_selectivity() assume that
    there are less than MAX_REF_PARTS hash-join KEYUSEs.
    
    If there are more than that, switch to using an array. Allocate the array
    on the heap: we can't allocate it on MEM_ROOT as table_cond_selectivity()
    is called many times during the optimization.
    
    (Variant 2, with review input addressed)
    cdb29960
selectivity_innodb.test 5.69 KB