• unknown's avatar
    Fixed bug#18175: The nest_level counter wasn't decremented for union parts which · ee46c5fb
    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.
    ee46c5fb
sql_yacc.yy 236 KB