• Oleg Smirnov's avatar
    MDEV-29731 Assertion failure when HAVING in a correlated subquery references... · 73ef86d4
    Oleg Smirnov authored
    MDEV-29731 Assertion failure when HAVING in a correlated subquery references columns in the outer query
    
    When resolving a column from the HAVING clause, a new Item_field
    object may be created inside Item_ref::fix_fields().
    But the object is created with an empty name resolution context,
    which then leads to debug assertion failure during
    Item_field::fix_fields().
    
    The solution is to pass the correct name resolution context
    when creating the Item_field object.
    
    Reviewer: Oleksandr Byelkin (sanja@mariadb.com)
    73ef86d4
item.cc 298 KB