• unknown's avatar
    Fixed bug#18175: The nest_level counter wasn't decremented for union parts which · 548b9aef
    unknown authored
    resulted in a wrong error message.
    
    The nest_level counter indicates the depth of nesting for a subselect. It is
    needed to properly resolve aggregate functions in nested subselects. Obviously 
    it shouldn't be incremented for UNION parts because they have the same level of
    nesting. This counter was incremented by 1 in the mysql_new_select() function
    for any new select and wasn't decremented for UNION parts. This resulted in
    wrongly reported error messages.
    
    Now the nest_level counter is decremented by 1 for any union part.
    
    
    mysql-test/t/union.test:
      Added test case for the bug#18175: The nest_level counter wasn't decremented for union parts which
      resulted in a wrong error message.
    mysql-test/r/union.result:
      Added test case for the bug#18175: The nest_level counter wasn't decremented for union parts which
      resulted in a wrong error message.
    sql/sql_yacc.yy:
      Fixed bug#18175: The nest_level counter wasn't decremented for union parts which
      resulted in a wrong error message.
      Now the nest_level counter is decremented by 1 for any union part.
    548b9aef
union.result 39.2 KB