• Igor Babaev's avatar
    MDEV-27212 Crash in Item_equal::sort on second execution of stored procedure · c5e68b6d
    Igor Babaev authored
    This bug could cause a crash of the server at the second call of a stored
    procedure when it executed a query containing a mergeable derived table /
    view whose specification used another mergeable derived_table or view and a
    subquery with outer reference in the select list of the specification.
    Such queries could cause the same problem when they were executed for the
    second time in a prepared mode.
    The problem appeared due to a typo mistake in the legacy code of the function
    create_view_field() that prevented building Item_direct_view_ref wrapper
    for the mentioned outer reference at the second execution of the query and
    setting the depended_from field for the outer reference.
    
    Approved by Oleksandr Byelkin <sanja@mariadb.com>
    c5e68b6d
derived_view.result 132 KB