• Igor Babaev's avatar
    MDEV-31102 Crash when pushing condition into view defined as union · 5dc9a6b4
    Igor Babaev authored
    This bug could manifest itself at the first execution of prepared statement
    created for queries using a materialized view defined as union. A crash
    could happen for sure if the query contained a condition pushable into
    the view and this condition was over the column defined via a complex string
    expression requiring implicit conversion from one charset to another for
    some of its sub-expressions. The bug could cause crashes when executing
    PS for some other queries whose optimization needed building clones for
    such expressions.
    
    This bug was introduced in the patch for MDEV-29988 where the class
    Item_direct_ref_to_item was added. The implementations of the virtual
    methods get_copy() and build_clone() were invalid for the class and this
    could cause crashes after the method build_clone() was called for
    expressions containing objects of the Item_direct_ref_to_item type.
    
    Approved by Sergei Golubchik <serg@mariadb.com>
    5dc9a6b4
derived_cond_pushdown.result 559 KB