• unknown's avatar
    Fixed bug #27348. · ec3de562
    unknown authored
    If a set function with a outer reference s(outer_ref) cannot be aggregated 
    the outer query against which the reference has been resolved then MySQL
    interpretes s(outer_ref) in the same way as it would interpret s(const).
    Hovever the standard requires throwing an error in this situation.
    Added some code to support this requirement in ansi mode.
    Corrected another minor bug in Item_sum::check_sum_func.
     
    
    
    mysql-test/r/subselect.result:
      Added a test case for bug #27348.
    mysql-test/t/subselect.test:
      Added a test case for bug #27348.
    sql/item_sum.cc:
      Fixed bug #27348.
      If a set function with a outer reference s(outer_ref) cannot be aggregated 
      the outer query against which the reference has been resolved then MySQL
      interprets s(outer_ref) in the same way as it would interpret s(const).
      Hovever the standard requires throwing an error in this situation.
      Added some code to support this requirement in ansi mode.
      Corrected another minor bug in Item_sum::check_sum_func.
    ec3de562
item_sum.cc 82.2 KB