• Igor Babaev's avatar
    Fixed bug mdev-5105. · 7c87385e
    Igor Babaev authored
    The bug caused a memory overwrite in the function update_ref_and_keys()
    It happened due to a wrong value of SELECT_LEX::cond_count. This value
    historically was calculated by the fix_fields method. Now the logic of
    calling this method became too complicated and, as a result, this value
    is calculated not always correctly.
    The patch changes the way how and when  the values of SELECT_LEX::cond_count
    and of SELECT_LEX::between_count are calculated. The new code does it just at
    the beginning of update_ref_and_keys().
     
    7c87385e
item_cmpfunc.cc 157 KB