• Georgi Kodinov's avatar
    Bug #49512 : subquery with aggregate function crash · d2f61748
    Georgi Kodinov authored
      subselect_single_select_engine::exec()
    
    When a subquery doesn't need to be evaluated because
    it returns only aggregate functions and these aggregates
    can be calculated from the metadata about the table it
    was not updating all the relevant members of the JOIN 
    structure to reflect that this is a constant query.
    This caused problems to the enclosing subquery 
    ('<> SOME' in the test case above) trying to read some
    data about the tables.
    
    Fixed by setting const_tables to the number of tables 
    when the SELECT is optimized away.
    d2f61748
subselect.test 126 KB