• Igor Babaev's avatar
    MDEV-25002 ON expressions cannot contain outer references · 4020e4ae
    Igor Babaev authored
    A bogus error message was issued for any outer references occurred in
    ON expressions used in subqueries. This prevented execution of queries
    containing subqueries as soon as they used outer references in their ON
    clauses. This happened because the Name_resolution_context structure
    created for any ON expression erroneously had the field outer_context set
    to NULL. The fields select_lex of this structure was not set correctly
    either.
    
    The idea of the fix was taken from mysql code of the function
    push_new_name_resolution_context().
    
    Approved by dmitry.shulga@mariadb.com
    4020e4ae
subselect_no_scache.result 251 KB