• unknown's avatar
    Fix for BUG#13597 - columns in ON condition not resolved if references a table... · 68a91293
    unknown authored
    Fix for BUG#13597 - columns in ON condition not resolved if references a table in a nested right join.
    
    The problem was in that when finding the last table reference in a nested join tree,
    the procedure doing the iteration over the right-most branches of a join tree
    was testing for RIGHT JOINs the table reference that represents the join, and not
    the second operand of the JOIN. Currently the information whether a join is LEFT/RIGHT
    is stored not on the join object itself, but on one of its operands.
    
    
    mysql-test/r/select.result:
      Added test for BUG#13597
    mysql-test/t/select.test:
      Added test for BUG#13597
    sql/table.cc:
      - test whether a table reference is a right join by testing the
        rigth join operand (first in the list of operands), and not
        the table reference that represents the join itself.
      - clearer comments
    68a91293
select.result 78.8 KB