• Igor Babaev's avatar
    MDEV-26189 Missing handling of unknown column in WHERE of recursive CTE · 4aeb2b1c
    Igor Babaev authored
    SQL processor failed to catch references to unknown columns and other
    errors of the phase of semantic analysis in the specification of a
    hanging recursive CTE. This happened because the function
    With_clause::prepare_unreferenced_elements() failed to detect a CTE as
    a hanging CTE if the CTE was recursive.
    Fixing this problem in the code of the mentioned function opened another
    problem: EXPLAIN started including the lines for the specifications of
    hanging recursive CTEs in its output. This problem also was fixed in this
    patch.
    
    Approved by Dmitry Shulga <dmitry.shulga@mariadb.com>
    4aeb2b1c
cte_recursive.test 64.1 KB