• Igor Babaev's avatar
    MDEV-26135 Assertion failure when executing PS with a hanging recursive CTE · f0533497
    Igor Babaev authored
    The bug affected execution of queries with With clauses containing so-called
    hanging recursive CTEs in PREPARE mode. A CTE is hanging if it's not used
    in the query. Preparation of a prepared statement from a query with a
    hanging CTE caused a leak in the server and execution of this prepared
    statement led to an assert failure of the server built in the debug mode.
    This happened because the units specifying recursive CTEs erroneously were
    not cleaned up if those CTEs were hanging.
    The patch enforces cleanup of hanging recursive CTEs in the same way as
    other hanging CTEs.
    
    Approved by dmitry.shulga@mariadb.com
    f0533497
cte_recursive.result 126 KB