• unknown's avatar
    Bug#23345: Wrongly allowed INTO in a non-last select of a UNION. · 16404523
    unknown authored
    INTO clause can be specified only for the last select of a UNION and it
    receives the result of the whole query. But it was wrongly allowed in
    non-last selects of a UNION which leads to a confusing query result.
    
    Now INTO allowed only in the last select of a UNION.
    
    
    mysql-test/t/union.test:
      Added a test case for the bug#23345: Wrongly allowed INTO in a non-last select of a UNION.
    mysql-test/r/union.result:
      Added a test case for the bug#23345: Wrongly allowed INTO in a non-last select of a UNION.
    sql/sql_yacc.yy:
      Bug#23345: Wrongly allowed INTO in a non-last select of a UNION.
      Now INTO allowed only in the last select of a UNION.
    16404523
sql_yacc.yy 256 KB