• unknown's avatar
    Fixed bug #28337: wrong results for grouping queries with correlated · 7c74368a
    unknown authored
    subqueries in WHERE conditions.
    This bug was introduced by the patch for bug 27321.
    
    
    mysql-test/r/subselect.result:
      Added a test case for bug #28337.
    mysql-test/t/subselect.test:
      Added a test case for bug #28337.
    sql/item.cc:
      Fixed bug #28337: wrong results for grouping queries with correlated
      subqueries in WHERE conditions.
      This bug was introduced by the patch for bug 27321.
      
      Now in the Item_field::fix_outer_field function we create an Item_outer_ref
      object for an outer reference only if it is used in the SELECT list or
      in the HAVING clause of the subquery against which the reference is resolved.
    7c74368a
subselect.test 109 KB