• Igor Babaev's avatar
    MDEV-19164 Assertion `fixed' failed in Item_func_inet_aton::val_int · 59ed5f3a
    Igor Babaev authored
    When pushing a condition from HAVING into WHERE the function
    st_select_lex::pushdown_from_having_into_where() transforms column
    references in the pushed condition then performs cleanup of
    items of the condition and finally calls fix_fields() for the condition
    items. The cleanup is performed by a call of the method walk() with
    cleanup_processor as the first parameter. Unfortunately this sequence
    of calls does not work if the condition contains cached items, because
    fix_fields() cannot go through Item_cache items and this leaves
    underlying items unfixed.
    The solution of this problem used in this patch is just does not allow
    to process Item_cache objects when performing cleanup of the pushed
    condition. In order to let the traversal procedure walk() not to process
    Item_cache objects the third parameter of the used call of walk()
    is set to a fictitious pointer (void *) 1. And Item_cache::walk() is
    changed to prevent any action when it gets such value as the third
    parameter.
    59ed5f3a
item.h 229 KB